Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/34403 )
Change subject: pickit2_spi: Remove dead assignment ......................................................................
Patch Set 1:
What we can do: Add a second `ret` variable and check them both:
ret = libusb_interrupt_transfer(..., ENDPOINT_OUT, ...); ret2 = libusb_interrupt_transfer(..., ENDPOINT_IN, ...); if (ret != 0 || ret2 != 0) ...
or check them individually, so we wouldn't run into the timeout for the second transfer if the first already failed:
ret = libusb_interrupt_transfer(..., ENDPOINT_OUT, ...); if (ret != 0) ... ret = libusb_interrupt_transfer(..., ENDPOINT_IN, ...); if (ret != 0) ...