OSDN Git Service

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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Oct 2017 09:51:17 +0000 (11:51 +0200)
commit2b5c7b95ea36521e7cb4f93be546a8be5fd9d667
treeeab07257ad961f6a25a05d005521c0a4bbd1d56e
parent77a4be89599c587f8b1ac6256ad7dc11a8ce28fa
usb: gadget: mass_storage: set msg_registered after msg registered

commit 8e55d30322c6a0ef746c256a1beda9c73ecb27a6 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/legacy/mass_storage.c