projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eccf2a4
)
cdc-acm: cleanup error handling
author
Oliver Neukum
<
[email protected]
>
Thu, 14 Jul 2016 13:41:32 +0000
(15:41 +0200)
committer
Greg Kroah-Hartman
<
[email protected]
>
Mon, 18 Jul 2016 15:46:57 +0000
(08:46 -0700)
A small update to unify error handling during probe().
Signed-off-by: Oliver Neukum <
[email protected]
>
Signed-off-by: Greg Kroah-Hartman <
[email protected]
>
drivers/usb/class/cdc-acm.c
patch
|
blob
|
history
diff --git
a/drivers/usb/class/cdc-acm.c
b/drivers/usb/class/cdc-acm.c
index 561baed7ba010a3b487686dfa8dcd999ebfab098..2e5dea866b6f700309e7b2232a2af0c37a09fd03 100644
(file)
--- a/
drivers/usb/class/cdc-acm.c
+++ b/
drivers/usb/class/cdc-acm.c
@@
-1328,11
+1328,8
@@
made_compressed_probe:
goto alloc_fail;
minor = acm_alloc_minor(acm);
- if (minor < 0) {
- dev_err(&intf->dev, "no more free acm devices\n");
- kfree(acm);
- return -ENODEV;
- }
+ if (minor < 0)
+ goto alloc_fail1;
ctrlsize = usb_endpoint_maxp(epctrl);
readsize = usb_endpoint_maxp(epread) *
@@
-1523,6
+1520,7
@@
alloc_fail4:
usb_free_coherent(usb_dev, ctrlsize, acm->ctrl_buffer, acm->ctrl_dma);
alloc_fail2:
acm_release_minor(acm);
+alloc_fail1:
kfree(acm);
alloc_fail:
return rv;