usb: gadget: printer: revert usb_add_function() effect in error recovery
authorAndrzej Pietrasiewicz <andrzej.p@samsung.com>
Tue, 3 Mar 2015 09:52:08 +0000 (10:52 +0100)
committerFelipe Balbi <balbi@ti.com>
Tue, 10 Mar 2015 20:33:34 +0000 (15:33 -0500)
commitf5bda0034fba942adf5555246e248ddb66c76052
tree4068dd9541c8b83c8cb6c37871a33c014984a241
parentc69b8186945c10d245586e9f9703486e9574170c
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>
drivers/usb/gadget/legacy/printer.c