There doesn't seem to be a particularly good reason to call
->trasport() one last time after 2 failures. Drop the call so allow
sharing this code with usb_stor_read_10() in the following commit.

Signed-off-by: Andrey Smirnov <andrew.smir...@gmail.com>
---
 drivers/usb/storage/usb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c
index a3442f576..d601e9ca4 100644
--- a/drivers/usb/storage/usb.c
+++ b/drivers/usb/storage/usb.c
@@ -227,7 +227,7 @@ static int usb_stor_write_10(struct us_blk_dev *usb_blkdev,
                usb_stor_request_sense(&srb, us);
        } while (retries--);
 
-       return us->transport(&srb, us);
+       return -EIO;
 }
 
 
-- 
2.20.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

Reply via email to