From: Wei Yongjun <yongjun_...@trendmicro.com.cn>

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_...@trendmicro.com.cn>
---
v1 -> v2: add commit which added this problem.
---
 drivers/usb/gadget/multi.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/gadget/multi.c b/drivers/usb/gadget/multi.c
index a74ebef..4a45e80 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)

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to