提交 f2267089 编写于 作者: L Li Jun 提交者: Felipe Balbi

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: NLi Jun <b47624@freescale.com>
Signed-off-by: NFelipe Balbi <balbi@ti.com>
上级 371254ce
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册