summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget/composite.c
diff options
context:
space:
mode:
authorFelipe Balbi <balbi@ti.com>2014-09-18 09:31:32 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-09-23 07:56:21 -0700
commitbf17eba7ae1e813b0ad67cb1078dcbd7083b906e (patch)
tree7705357b04336caa91ca4d7819f8284de01ab11b /drivers/usb/gadget/composite.c
parent6ca01a1b451de067462368bd9737efb7accb291c (diff)
Revert "usb: gadget: composite: dequeue cdev->req before free it in composite_dev_cleanup"
This reverts commit f2267089ea17fa97b796b1b4247e3f8957655df3. That commit causes more problem than fixes. Firstly, kfree() should be called after usb_ep_dequeue() and secondly, the way things are, we will try to dequeue a request that has already completed much more frequently than one which is pending. Cc: Li Jun <b47624@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com> Cc: stable <stable@vger.kernel.org> # 3.17 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/gadget/composite.c')
-rw-r--r--drivers/usb/gadget/composite.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c
index e07eddbb3f8c..a8c18df171c3 100644
--- a/drivers/usb/gadget/composite.c
+++ b/drivers/usb/gadget/composite.c
@@ -1956,7 +1956,6 @@ 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;