summaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorLi Jun <B47624@freescale.com>2014-07-15 22:07:40 +0800
committerFelipe Balbi <balbi@ti.com>2014-07-16 10:05:01 -0500
commitf2267089ea17fa97b796b1b4247e3f8957655df3 (patch)
tree1c93af96beef656045db885678c10629a1b32c5b /drivers/usb
parent371254ce462fcea2d09ffa30e20f01538b833080 (diff)
downloadtalos-obmc-linux-f2267089ea17fa97b796b1b4247e3f8957655df3.tar.gz
talos-obmc-linux-f2267089ea17fa97b796b1b4247e3f8957655df3.zip
usb: gadget: composite: dequeue cdev->req before free it in composite_dev_cleanup
This patch try to dequeue the cdev->req to guarantee the request is not queued before free it. Signed-off-by: Li Jun <b47624@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/gadget/composite.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c
index f80151932053..6935a822ce2b 100644
--- a/drivers/usb/gadget/composite.c
+++ b/drivers/usb/gadget/composite.c
@@ -1956,6 +1956,7 @@ void composite_dev_cleanup(struct usb_composite_dev *cdev)
}
if (cdev->req) {
kfree(cdev->req->buf);
+ usb_ep_dequeue(cdev->gadget->ep0, cdev->req);
usb_ep_free_request(cdev->gadget->ep0, cdev->req);
}
cdev->next_string_id = 0;
OpenPOWER on IntegriCloud