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)
...

View Change

To view, visit change 34403. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I4aac5e1f3bd0604b079e1fdd9b7f09f1f4fc2d7f
Gerrit-Change-Number: 34403
Gerrit-PatchSet: 1
Gerrit-Owner: HAOUAS Elyes <ehaouas@noos.fr>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-CC: Nico Huber <nico.h@gmx.de>
Gerrit-Comment-Date: Thu, 18 Jul 2019 12:10:37 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment