diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2013-10-12 02:24:08 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-10-17 15:39:50 -0400 |
commit | 09b69024d97356fb660d1162e172ed4f1be7ceae (patch) | |
tree | 989493bcb49e36f9adbe4096ebf97f8a416ad821 /drivers/net | |
parent | 725907827a7f46dfb5df6e4f3d8f9bcbc9903877 (diff) |
usbnet: fix error return code in usbnet_probe()
Fix to return -ENOMEM in the padding pkt alloc fail error handling
case instead of 0, as done elsewhere in this function.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/usb/usbnet.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c index bf94e10a37c8..90a429b7ebad 100644 --- a/drivers/net/usb/usbnet.c +++ b/drivers/net/usb/usbnet.c | |||
@@ -1688,8 +1688,10 @@ usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod) | |||
1688 | if (dev->can_dma_sg && !(info->flags & FLAG_SEND_ZLP) && | 1688 | if (dev->can_dma_sg && !(info->flags & FLAG_SEND_ZLP) && |
1689 | !(info->flags & FLAG_MULTI_PACKET)) { | 1689 | !(info->flags & FLAG_MULTI_PACKET)) { |
1690 | dev->padding_pkt = kzalloc(1, GFP_KERNEL); | 1690 | dev->padding_pkt = kzalloc(1, GFP_KERNEL); |
1691 | if (!dev->padding_pkt) | 1691 | if (!dev->padding_pkt) { |
1692 | status = -ENOMEM; | ||
1692 | goto out4; | 1693 | goto out4; |
1694 | } | ||
1693 | } | 1695 | } |
1694 | 1696 | ||
1695 | status = register_netdev (net); | 1697 | status = register_netdev (net); |