Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f5bda003 authored by Andrzej Pietrasiewicz's avatar Andrzej Pietrasiewicz Committed by Felipe Balbi
Browse files

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: default avatarAndrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent c69b8186
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;
}