From e32e7897039873adafb57263d4253ed3f878575b Mon Sep 17 00:00:00 2001 From: Suresh Gupta Date: Fri, 11 Apr 2014 20:03:22 +0530 Subject: USB : Gadget : fsl: Fix the fault issue on rmmod completion in udc_controller->done should be assign with proper value before complete called. The complete called in fsl_udc_release which intern called from usb_del_gadget_udc, so moving assignment before calling usb_del_gadget_udc Signed-off-by: Suresh Gupta Change-Id: I40867db4c11464d7d47e1fd55ed852b38c7d0e47 Reviewed-on: http://git.am.freescale.net:8181/10911 Tested-by: Review Code-CDREVIEW Reviewed-by: Nikhil Badola Reviewed-by: Jose Rivera diff --git a/drivers/usb/gadget/fsl_udc_core.c b/drivers/usb/gadget/fsl_udc_core.c index fa27a4c..c540dfa 100644 --- a/drivers/usb/gadget/fsl_udc_core.c +++ b/drivers/usb/gadget/fsl_udc_core.c @@ -2536,8 +2536,8 @@ static int __exit fsl_udc_remove(struct platform_device *pdev) if (!udc_controller) return -ENODEV; - usb_del_gadget_udc(&udc_controller->gadget); udc_controller->done = &done; + usb_del_gadget_udc(&udc_controller->gadget); fsl_udc_clk_release(); -- cgit v0.10.2