summaryrefslogtreecommitdiffstats
path: root/drivers/usb/storage
diff options
context:
space:
mode:
authorAndrey Smirnov <andrew.smirnov@gmail.com>2019-03-07 00:00:19 -0800
committerSascha Hauer <s.hauer@pengutronix.de>2019-03-11 08:11:18 +0100
commitaa12d1e5be6ee7fb2411d7318567941e403186be (patch)
tree70137b56e9f507fe508781d0a20f42a6b4559084 /drivers/usb/storage
parent73a270d16f09cf869f139ac64b9e99fe1e4c52ea (diff)
downloadbarebox-aa12d1e5be6ee7fb2411d7318567941e403186be.tar.gz
barebox-aa12d1e5be6ee7fb2411d7318567941e403186be.tar.xz
usb: storage: Drop extra call to transport in usb_stor_write_10()
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.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/usb/storage')
-rw-r--r--drivers/usb/storage/usb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c
index a3442f5763..d601e9ca4d 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;
}