From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-pg1-x543.google.com ([2607:f8b0:4864:20::543]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h1nxT-0002z7-Vu for barebox@lists.infradead.org; Thu, 07 Mar 2019 08:00:54 +0000 Received: by mail-pg1-x543.google.com with SMTP id b2so10624291pgl.9 for ; Thu, 07 Mar 2019 00:00:51 -0800 (PST) From: Andrey Smirnov Date: Thu, 7 Mar 2019 00:00:19 -0800 Message-Id: <20190307080036.28028-10-andrew.smirnov@gmail.com> In-Reply-To: <20190307080036.28028-1-andrew.smirnov@gmail.com> References: <20190307080036.28028-1-andrew.smirnov@gmail.com> MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH 09/26] usb: storage: Drop extra call to transport in usb_stor_write_10() To: barebox@lists.infradead.org Cc: Andrey Smirnov 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 --- 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