Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8e7e61df authored by Peter Korsgaard's avatar Peter Korsgaard Committed by Greg Kroah-Hartman
Browse files

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: default avatarPeter Korsgaard <jacmet@sunsite.dk>
Acked-by: default avatarMichal Nazarewicz <m.nazarewicz@samsung.com>
Cc: stable <stable@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 2b626dc1
Loading
Loading
Loading
Loading
+0 −1
Original line number Original line Diff line number Diff line
@@ -2865,7 +2865,6 @@ static struct fsg_common *fsg_common_init(struct fsg_common *common,
	/* Call fsg_common_release() directly, ref might be not
	/* Call fsg_common_release() directly, ref might be not
	 * initialised */
	 * initialised */
	fsg_common_release(&common->ref);
	fsg_common_release(&common->ref);
	complete(&common->thread_notifier);
	return ERR_PTR(rc);
	return ERR_PTR(rc);
}
}