usb: gadget: mass_storage: set msg_registered after msg registered
authorLi Jun <jun.li@nxp.com>
Fri, 14 Apr 2017 11:12:07 +0000 (19:12 +0800)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Tue, 13 Jun 2017 10:21:08 +0000 (13:21 +0300)
commit8e55d30322c6a0ef746c256a1beda9c73ecb27a6
tree8aab4548f160577b3300fdddf9376889ef53c91d
parent2d4aa21a73ba1019195f2200361c0fabe6f7d261
usb: gadget: mass_storage: set msg_registered after msg registered

If there is no UDC available, the msg register will fail and this
flag will not be set, but the driver is already added into pending
driver list, then the module removal modprobe -r can not remove
the driver from the pending list.

Signed-off-by: Li Jun <jun.li@nxp.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/gadget/legacy/mass_storage.c