usb: gadget: adb: do not set error flag when dequeuing req
Colin Cross [Fri, 9 Mar 2012 01:57:51 +0000 (17:57 -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 4433a4d..3827715 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);