summaryrefslogtreecommitdiff
path: root/drivers/usb
diff options
context:
space:
mode:
authorRebecca Schultz Zavin <rebecca@android.com>2009-08-25 15:46:01 -0700
committerMike Lockwood <lockwood@android.com>2009-09-08 10:47:37 -0400
commit6962e9ca23f70799bc733d59d177c12e220092a5 (patch)
tree9379d4f900ba0cef98eb72ac631411fa151843f5 /drivers/usb
parent7f9231c8caaad48d9dd3123558d06d846876dd41 (diff)
usb: gadget: f_mass_storage: Clean up wakelocks on error paths
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com> Signed-off-by: Mike Lockwood <lockwood@android.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/gadget/f_mass_storage.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/gadget/f_mass_storage.c b/drivers/usb/gadget/f_mass_storage.c
index 137e27019d82..f63f572adfe3 100644
--- a/drivers/usb/gadget/f_mass_storage.c
+++ b/drivers/usb/gadget/f_mass_storage.c
@@ -2962,6 +2962,7 @@ int __init mass_storage_function_add(struct usb_composite_dev *cdev,
return 0;
err_usb_add_function:
+ wake_lock_destroy(&the_fsg->wake_lock);
platform_driver_unregister(&fsg_platform_driver);
err_platform_driver_register:
switch_dev_unregister(&the_fsg->sdev);