Skip to content

Commit

Permalink
USB: f_mass_storage: fix crash on bind() error
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Peter Korsgaard authored and Greg Kroah-Hartman committed Mar 2, 2010
1 parent 2b626dc commit 8e7e61d
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/usb/gadget/f_mass_storage.c
Original file line number Diff line number Diff line change
Expand Up @@ -2865,7 +2865,6 @@ static struct fsg_common *fsg_common_init(struct fsg_common *common,
/* Call fsg_common_release() directly, ref might be not
* initialised */
fsg_common_release(&common->ref);
complete(&common->thread_notifier);
return ERR_PTR(rc);
}

Expand Down

0 comments on commit 8e7e61d

Please sign in to comment.