projects
/
GitHub
/
exynos8895
/
android_kernel_samsung_universal8895.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c69b818
)
usb: gadget: printer: revert usb_add_function() effect in error recovery
author
Andrzej Pietrasiewicz
<andrzej.p@samsung.com>
Tue, 3 Mar 2015 09:52:08 +0000
(10:52 +0100)
committer
Felipe Balbi
<balbi@ti.com>
Tue, 10 Mar 2015 20:33:34 +0000
(15:33 -0500)
Whenever the "goto fail" branch is taken, the effect of usb_add_function()
should be reverted.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/gadget/legacy/printer.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/usb/gadget/legacy/printer.c
b/drivers/usb/gadget/legacy/printer.c
index 12247d3fe7685a9793475fb82b94851c143184a4..eb02a6b8da08aeb3c32f8d1c24ac4a03ebf2c4a2 100644
(file)
--- a/
drivers/usb/gadget/legacy/printer.c
+++ b/
drivers/usb/gadget/legacy/printer.c
@@
-1285,6
+1285,7
@@
static int __init printer_bind_config(struct usb_configuration *c)
fail:
printer_cfg_unbind(c);
+ usb_remove_function(c, &dev->function);
return status;
}