summaryrefslogtreecommitdiff
path: root/drivers/usb
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb')
-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 c6ee6f1..2c52551 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)