]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/usb/renesas_usbhs/mod_gadget.c
Merge branch 'karo-tx6-mainline' into stable
[karo-tx-linux.git] / drivers / usb / renesas_usbhs / mod_gadget.c
index 8f7a78e7097598a50e9d7ba3cc72831b41af25b8..fa14198daf77a7d4479566e4d2cfc1845a2c619a 100644 (file)
@@ -158,10 +158,14 @@ static void usbhsg_queue_done(struct usbhs_priv *priv, struct usbhs_pkt *pkt)
        struct usbhs_pipe *pipe = pkt->pipe;
        struct usbhsg_uep *uep = usbhsg_pipe_to_uep(pipe);
        struct usbhsg_request *ureq = usbhsg_pkt_to_ureq(pkt);
+       unsigned long flags;
 
        ureq->req.actual = pkt->actual;
 
-       usbhsg_queue_pop(uep, ureq, 0);
+       usbhs_lock(priv, flags);
+       if (uep)
+               __usbhsg_queue_pop(uep, ureq, 0);
+       usbhs_unlock(priv, flags);
 }
 
 static void usbhsg_queue_push(struct usbhsg_uep *uep,