aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Korsgaard <jacmet@sunsite.dk>2010-02-04 11:15:25 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2010-03-02 17:54:55 -0500
commit8e7e61dfbf1ec6418bf89505980b158a8d00d877 (patch)
tree6b7411089acf313bda8076d1a58a48baf68f38a8
parent2b626dc134d38d0001b98acf8c7293b6bc5ee86d (diff)
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 <jacmet@sunsite.dk> Acked-by: Michal Nazarewicz <m.nazarewicz@samsung.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/usb/gadget/f_mass_storage.c1
1 files changed, 0 insertions, 1 deletions
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:
2865 /* Call fsg_common_release() directly, ref might be not 2865 /* Call fsg_common_release() directly, ref might be not
2866 * initialised */ 2866 * initialised */
2867 fsg_common_release(&common->ref); 2867 fsg_common_release(&common->ref);
2868 complete(&common->thread_notifier);
2869 return ERR_PTR(rc); 2868 return ERR_PTR(rc);
2870} 2869}
2871 2870