From: Peter Korsgaard Date: Thu, 4 Feb 2010 16:15:25 +0000 (+0100) Subject: USB: f_mass_storage: fix crash on bind() error X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=8e7e61dfbf1ec6418bf89505980b158a8d00d877;p=openwrt%2Fstaging%2Fblogic.git USB: f_mass_storage: fix crash on bind() error init_completion() hasn't been called yet and the thread isn't created if we end up here, so don't call complete() on thread_notifier. Signed-off-by: Peter Korsgaard Acked-by: Michal Nazarewicz Cc: stable Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/gadget/f_mass_storage.c b/drivers/usb/gadget/f_mass_storage.c index 0553d9a5536b..e6abde39857d 100644 --- a/drivers/usb/gadget/f_mass_storage.c +++ b/drivers/usb/gadget/f_mass_storage.c @@ -2865,7 +2865,6 @@ error_release: /* Call fsg_common_release() directly, ref might be not * initialised */ fsg_common_release(&common->ref); - complete(&common->thread_notifier); return ERR_PTR(rc); }