Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f2267089 authored by Li Jun's avatar Li Jun Committed by Felipe Balbi
Browse files

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: default avatarLi Jun <b47624@freescale.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent 371254ce
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;