usb: musb: gadget: fix kernel crash after rmmod
authorAjay Kumar Gupta <ajay.gupta@ti.com>
Wed, 4 Jul 2012 05:17:14 +0000 (10:47 +0530)
committerAjay Kumar Gupta <ajay.gupta@ti.com>
Fri, 6 Jul 2012 01:21:45 +0000 (06:51 +0530)
commitef17643d4f1a61276f51a08163d74e3c4f597efe
treec2d42f329c39b8c5b770f47367fa00ad78bd7594
parent723e9f9000389c2215a807010b03a10cff6b5fb0
usb: musb: gadget: fix kernel crash after rmmod

musb->gadget_driver was not getting reset to NULL after the gadget
driver is removed. This leads to kernel panic while doing proc read
when it tries to print the gadget driver name.

Fixing the same by resetting the musb->gadget_driver to NULL when
gadget driver is removed.
drivers/usb/musb/musb_gadget.c