提交 c8c18883 编写于 作者: W Wei Yongjun 提交者: Felipe Balbi

usb: gadget: zero: fix error return code in zero_bind()

Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.

Introduced by commit cf9a08ae
(usb: gadget: convert source sink and loopback to new function interface)
Acked-by: NMichal Nazarewicz <mina86@mina86.com>
Signed-off-by: NWei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: NFelipe Balbi <balbi@ti.com>
上级 f722406f
......@@ -284,12 +284,16 @@ static int __init zero_bind(struct usb_composite_dev *cdev)
ss_opts->bulk_buflen = gzero_options.bulk_buflen;
func_ss = usb_get_function(func_inst_ss);
if (IS_ERR(func_ss))
if (IS_ERR(func_ss)) {
status = PTR_ERR(func_ss);
goto err_put_func_inst_ss;
}
func_inst_lb = usb_get_function_instance("Loopback");
if (IS_ERR(func_inst_lb))
if (IS_ERR(func_inst_lb)) {
status = PTR_ERR(func_inst_lb);
goto err_put_func_ss;
}
lb_opts = container_of(func_inst_lb, struct f_lb_opts, func_inst);
lb_opts->bulk_buflen = gzero_options.bulk_buflen;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册