summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2013-04-06 11:23:22 +0200
committerFelipe Balbi <balbi@ti.com>2013-04-23 13:11:29 +0200
commitad46047bd1988d61bc53ea354b77ef40f8a674a5 (patch)
treec7780a3dffe1ff8504f2a3495b04d3aa8b7e00e7 /drivers
parentusb: gadget: f_obex: fix error return code in obex_bind() (diff)
downloadlinux-ad46047bd1988d61bc53ea354b77ef40f8a674a5.tar.xz
linux-ad46047bd1988d61bc53ea354b77ef40f8a674a5.zip
usb: gadget: multi: fix error return code in rndis_do_config()
Fix to return a negative error code from the error handling case instead of 0, as returned elsewhere in this function. Introduced by commit 59835a (usb: gadget: multi: use function framework for ACM.) Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/gadget/multi.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/usb/gadget/multi.c b/drivers/usb/gadget/multi.c
index a74ebefc7682..4a45e80c6e38 100644
--- a/drivers/usb/gadget/multi.c
+++ b/drivers/usb/gadget/multi.c
@@ -157,8 +157,10 @@ static __init int rndis_do_config(struct usb_configuration *c)
return ret;
f_acm_rndis = usb_get_function(fi_acm);
- if (IS_ERR(f_acm_rndis))
+ if (IS_ERR(f_acm_rndis)) {
+ ret = PTR_ERR(f_acm_rndis);
goto err_func_acm;
+ }
ret = usb_add_function(c, f_acm_rndis);
if (ret)