summaryrefslogtreecommitdiff
path: root/payloads
diff options
context:
space:
mode:
Diffstat (limited to 'payloads')
-rwxr-xr-x[-rw-r--r--]payloads/libpayload/drivers/usb/usbmsc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/payloads/libpayload/drivers/usb/usbmsc.c b/payloads/libpayload/drivers/usb/usbmsc.c
index 2412e99af3..d8b7bcea6e 100644..100755
--- a/payloads/libpayload/drivers/usb/usbmsc.c
+++ b/payloads/libpayload/drivers/usb/usbmsc.c
@@ -232,9 +232,9 @@ get_csw (endpoint_t *ep, csw_t *csw)
if (ret < 0) {
clear_stall (ep);
- if (ctrlr->bulk (ep, sizeof (csw_t), (u8 *) csw, 1) < 0) {
+ ret = ctrlr->bulk (ep, sizeof (csw_t), (u8 *) csw, 1);
+ if (ret < 0)
return reset_transport (ep->dev);
- }
}
if (ret != sizeof(csw_t) || csw->dCSWTag != tag ||
csw->dCSWSignature != csw_signature) {