aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/dummy_hcd.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/gadget/dummy_hcd.c')
-rw-r--r--drivers/usb/gadget/dummy_hcd.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/usb/gadget/dummy_hcd.c b/drivers/usb/gadget/dummy_hcd.c
index 0cb032526ca2..f2b124cf3206 100644
--- a/drivers/usb/gadget/dummy_hcd.c
+++ b/drivers/usb/gadget/dummy_hcd.c
@@ -1029,8 +1029,7 @@ static int dummy_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status)
1029static void maybe_set_status (struct urb *urb, int status) 1029static void maybe_set_status (struct urb *urb, int status)
1030{ 1030{
1031 spin_lock (&urb->lock); 1031 spin_lock (&urb->lock);
1032 if (urb->status == -EINPROGRESS) 1032 urb->status = status;
1033 urb->status = status;
1034 spin_unlock (&urb->lock); 1033 spin_unlock (&urb->lock);
1035} 1034}
1036 1035
@@ -1257,10 +1256,9 @@ restart:
1257 int type; 1256 int type;
1258 1257
1259 urb = urbp->urb; 1258 urb = urbp->urb;
1260 if (urb->status != -EINPROGRESS) { 1259 if (urb->unlinked)
1261 /* likely it was just unlinked */
1262 goto return_urb; 1260 goto return_urb;
1263 } else if (dum->rh_state != DUMMY_RH_RUNNING) 1261 else if (dum->rh_state != DUMMY_RH_RUNNING)
1264 continue; 1262 continue;
1265 type = usb_pipetype (urb->pipe); 1263 type = usb_pipetype (urb->pipe);
1266 1264