projects
/
GitHub
/
exynos8895
/
android_kernel_samsung_universal8895.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
720f3d7
)
usbnet: fix failure handling in usbnet_probe
author
tom.leiming@gmail.com
<tom.leiming@gmail.com>
Sun, 29 Apr 2012 22:51:03 +0000
(22:51 +0000)
committer
David S. Miller
<davem@davemloft.net>
Thu, 3 May 2012 00:13:04 +0000
(20:13 -0400)
If register_netdev returns failure, the dev->interrupt and
its transfer buffer should be released, so just fix it.
Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/usb/usbnet.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/net/usb/usbnet.c
b/drivers/net/usb/usbnet.c
index ca6fd80c2b40ed79f1ace340b4cc0c274660a356..2d927fb4adf4ea6805b2aeb02d06c8cb5108f496 100644
(file)
--- a/
drivers/net/usb/usbnet.c
+++ b/
drivers/net/usb/usbnet.c
@@
-1444,7
+1444,7
@@
usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod)
status = register_netdev (net);
if (status)
- goto out
3
;
+ goto out
4
;
netif_info(dev, probe, dev->net,
"register '%s' at usb-%s-%s, %s, %pM\n",
udev->dev.driver->name,
@@
-1462,6
+1462,8
@@
usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod)
return 0;
+out4:
+ usb_free_urb(dev->interrupt);
out3:
if (info->unbind)
info->unbind (dev, udev);