提交 f5bda003 编写于 作者: A Andrzej Pietrasiewicz 提交者: Felipe Balbi

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: NAndrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: NFelipe Balbi <balbi@ti.com>
上级 c69b8186
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册