diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2013-04-06 17:25:21 +0800 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2013-04-23 14:11:51 +0300 |
commit | 8d6f51bda67bb68b33ed4a48c57b0904a3395301 (patch) | |
tree | d3421498076bef29f0a3f0f129e6df609b79dd15 | |
parent | ad46047bd1988d61bc53ea354b77ef40f8a674a5 (diff) | |
download | linux-8d6f51bda67bb68b33ed4a48c57b0904a3395301.tar.gz linux-8d6f51bda67bb68b33ed4a48c57b0904a3395301.tar.bz2 linux-8d6f51bda67bb68b33ed4a48c57b0904a3395301.zip |
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>
-rw-r--r-- | drivers/usb/gadget/cdc2.c | 4 |
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) return PTR_ERR(fi_serial); f_acm = usb_get_function(fi_serial); - if (IS_ERR(f_acm)) + if (IS_ERR(f_acm)) { + status = PTR_ERR(f_acm); goto err_func_acm; + } status = usb_add_function(c, f_acm); if (status) |