usb: gadget: adb: do not set error flag when dequeuing req
authorColin Cross <ccross@android.com>
Fri, 9 Mar 2012 01:57:51 +0000 (17:57 -0800)
committerJohn Stultz <john.stultz@linaro.org>
Tue, 16 Feb 2016 21:51:53 +0000 (13:51 -0800)
When an ep_out req is dequeued because of userspace freezing,
don't set the error flag.

Change-Id: I680f1a1059b8ac2244aaa069e7d42dc44abf98e9
Signed-off-by: Colin Cross <ccross@android.com>
drivers/usb/gadget/f_adb.c

index 4433a4dbdfb100105daae746e8bee18103a26dc4..3827715f832d755369a4ffe33f5d52a45912936f 100644 (file)
@@ -205,7 +205,7 @@ static void adb_complete_out(struct usb_ep *ep, struct usb_request *req)
        struct adb_dev *dev = _adb_dev;
 
        dev->rx_done = 1;
-       if (req->status != 0)
+       if (req->status != 0 && req->status != -ECONNRESET)
                dev->error = 1;
 
        wake_up(&dev->read_wq);