projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e581c8c
)
USB: gadget: amd5536udc.c: fix error path
author
Rahul Ruikar
<
[email protected]
>
Wed, 20 Oct 2010 23:01:51 +0000
(16:01 -0700)
committer
Greg Kroah-Hartman
<
[email protected]
>
Fri, 22 Oct 2010 17:22:19 +0000
(10:22 -0700)
In function udc_probe() call put_device() when device_register() fails.
Signed-off-by: Rahul Ruikar <
[email protected]
>
Acked-by: Thomas Dahlmann <
[email protected]
>
Cc: David Brownell <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Greg Kroah-Hartman <
[email protected]
>
drivers/usb/gadget/amd5536udc.c
patch
|
blob
|
history
diff --git
a/drivers/usb/gadget/amd5536udc.c
b/drivers/usb/gadget/amd5536udc.c
index 2b361500af1e85e8906c263b7774e0494227b9f3..9034e03447235bfc5061f60630f1392e38536e2f 100644
(file)
--- a/
drivers/usb/gadget/amd5536udc.c
+++ b/
drivers/usb/gadget/amd5536udc.c
@@
-3383,8
+3383,10
@@
static int udc_probe(struct udc *dev)
udc = dev;
retval = device_register(&dev->gadget.dev);
- if (retval)
+ if (retval) {
+ put_device(&dev->gadget.dev);
goto finished;
+ }
/* timer init */
init_timer(&udc_timer);