aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2013-04-06 05:25:21 -0400
committerFelipe Balbi <balbi@ti.com>2013-04-23 07:11:51 -0400
commit8d6f51bda67bb68b33ed4a48c57b0904a3395301 (patch)
treed3421498076bef29f0a3f0f129e6df609b79dd15 /drivers/usb/gadget
parentad46047bd1988d61bc53ea354b77ef40f8a674a5 (diff)
usb: gadget: cdc2: fix error return code in cdc_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 29a664 (usb: gadget: cdc2: 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/usb/gadget')
-rw-r--r--drivers/usb/gadget/cdc2.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/usb/gadget/cdc2.c b/drivers/usb/gadget/cdc2.c
index c6ee6f1558c3..2c5255182769 100644
--- a/drivers/usb/gadget/cdc2.c
+++ b/drivers/usb/gadget/cdc2.c
@@ -129,8 +129,10 @@ static int __init cdc_do_config(struct usb_configuration *c)
129 return PTR_ERR(fi_serial); 129 return PTR_ERR(fi_serial);
130 130
131 f_acm = usb_get_function(fi_serial); 131 f_acm = usb_get_function(fi_serial);
132 if (IS_ERR(f_acm)) 132 if (IS_ERR(f_acm)) {
133 status = PTR_ERR(f_acm);
133 goto err_func_acm; 134 goto err_func_acm;
135 }
134 136
135 status = usb_add_function(c, f_acm); 137 status = usb_add_function(c, f_acm);
136 if (status) 138 if (status)