diff options
author | Andrzej Pietrasiewicz <andrzej.p@samsung.com> | 2015-03-03 09:52:08 (GMT) |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2015-03-10 20:33:34 (GMT) |
commit | f5bda0034fba942adf5555246e248ddb66c76052 (patch) | |
tree | 4068dd9541c8b83c8cb6c37871a33c014984a241 /drivers/usb/gadget/legacy | |
parent | c69b8186945c10d245586e9f9703486e9574170c (diff) | |
download | linux-f5bda0034fba942adf5555246e248ddb66c76052.tar.xz |
usb: gadget: printer: revert usb_add_function() effect in error recovery
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>
Diffstat (limited to 'drivers/usb/gadget/legacy')
-rw-r--r-- | drivers/usb/gadget/legacy/printer.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/gadget/legacy/printer.c b/drivers/usb/gadget/legacy/printer.c index 12247d3..eb02a6b 100644 --- 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; } |