summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelipe Balbi <balbi@ti.com>2014-09-18 09:31:32 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-10-15 12:29:24 +0200
commit2d8b382aca6d7a158c27b4e0c2eb8896dee866b4 (patch)
tree12ac37e599ea559adb54bee4ef7d8fa042ace676
parent6ed8a450f618ebca47b03c59c6975cfd76790542 (diff)
downloadlinux-2d8b382aca6d7a158c27b4e0c2eb8896dee866b4.tar.gz
Revert "usb: gadget: composite: dequeue cdev->req before free it in composite_dev_cleanup"
commit bf17eba7ae1e813b0ad67cb1078dcbd7083b906e upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-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 6935a822ce2b..f80151932053 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;