* [PATCH] usb: gadget: f_mass_storage: Fix error path
@ 2010-10-03 5:11 Rahul Ruikar
0 siblings, 0 replies; only message in thread
From: Rahul Ruikar @ 2010-10-03 5:11 UTC (permalink / raw)
To: David Brownell, Greg Kroah-Hartman, Michal Nazarewicz,
Kyungmin Park, Peter Korsgaard
Cc: linux-usb, linux-kernel, Rahul Ruikar
call put_device() when device_register() fails.
Signed-off-by: Rahul Ruikar <rahul.ruikar@gmail.com>
---
drivers/usb/gadget/f_mass_storage.c | 1 +
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 32cce02..fd634e1 100644
--- a/drivers/usb/gadget/f_mass_storage.c
+++ b/drivers/usb/gadget/f_mass_storage.c
@@ -2759,6 +2759,7 @@ static struct fsg_common *fsg_common_init(struct fsg_common *common,
if (rc) {
INFO(common, "failed to register LUN%d: %d\n", i, rc);
common->nluns = i;
+ put_device(&curlun->dev);
goto error_release;
}
--
1.7.2.3
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-10-03 5:12 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-03 5:11 [PATCH] usb: gadget: f_mass_storage: Fix error path Rahul Ruikar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®