aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/usb/gadget/f_mass_storage.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/usb/gadget/f_mass_storage.c b/drivers/usb/gadget/f_mass_storage.c
index c71f69fbf730..365f1b3ab155 100644
--- a/drivers/usb/gadget/f_mass_storage.c
+++ b/drivers/usb/gadget/f_mass_storage.c
@@ -2657,7 +2657,7 @@ static int fsg_main_thread(void *common_)
2657 up_write(&common->filesem); 2657 up_write(&common->filesem);
2658 } 2658 }
2659 2659
2660 /* Let the unbind and cleanup routines know the thread has exited */ 2660 /* Let fsg_unbind() know the thread has exited */
2661 complete_and_exit(&common->thread_notifier, 0); 2661 complete_and_exit(&common->thread_notifier, 0);
2662} 2662}
2663 2663
@@ -2906,9 +2906,6 @@ static void fsg_common_release(struct kref *ref)
2906 if (common->state != FSG_STATE_TERMINATED) { 2906 if (common->state != FSG_STATE_TERMINATED) {
2907 raise_exception(common, FSG_STATE_EXIT); 2907 raise_exception(common, FSG_STATE_EXIT);
2908 wait_for_completion(&common->thread_notifier); 2908 wait_for_completion(&common->thread_notifier);
2909
2910 /* The cleanup routine waits for this completion also */
2911 complete(&common->thread_notifier);
2912 } 2909 }
2913 2910
2914 if (likely(common->luns)) { 2911 if (likely(common->luns)) {