diff options
| author | Wolfram Sang <wsa-dev@sang-engineering.com> | 2016-08-11 17:05:20 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2016-08-13 17:53:38 -0400 |
| commit | 87ced2f9584efc476b955eb2343728fab20ff80b (patch) | |
| tree | d17cad8a16cc8ce9224f4526a2cf2e5a1c26bb91 /drivers/net/can/usb | |
| parent | 6176e89c5734e597f3e2279c8d5629a523cf6537 (diff) | |
net: can: usb: ems_usb: don't print error when allocating urb fails
kmalloc will print enough information in case of failure.
Signed-off-by: Wolfram Sang <wsa-dev@sang-engineering.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/can/usb')
| -rw-r--r-- | drivers/net/can/usb/ems_usb.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/net/can/usb/ems_usb.c b/drivers/net/can/usb/ems_usb.c index 71f0e791355b..b3d02759c226 100644 --- a/drivers/net/can/usb/ems_usb.c +++ b/drivers/net/can/usb/ems_usb.c | |||
| @@ -600,7 +600,6 @@ static int ems_usb_start(struct ems_usb *dev) | |||
| 600 | /* create a URB, and a buffer for it */ | 600 | /* create a URB, and a buffer for it */ |
| 601 | urb = usb_alloc_urb(0, GFP_KERNEL); | 601 | urb = usb_alloc_urb(0, GFP_KERNEL); |
| 602 | if (!urb) { | 602 | if (!urb) { |
| 603 | netdev_err(netdev, "No memory left for URBs\n"); | ||
| 604 | err = -ENOMEM; | 603 | err = -ENOMEM; |
| 605 | break; | 604 | break; |
| 606 | } | 605 | } |
| @@ -752,10 +751,8 @@ static netdev_tx_t ems_usb_start_xmit(struct sk_buff *skb, struct net_device *ne | |||
| 752 | 751 | ||
| 753 | /* create a URB, and a buffer for it, and copy the data to the URB */ | 752 | /* create a URB, and a buffer for it, and copy the data to the URB */ |
| 754 | urb = usb_alloc_urb(0, GFP_ATOMIC); | 753 | urb = usb_alloc_urb(0, GFP_ATOMIC); |
| 755 | if (!urb) { | 754 | if (!urb) |
| 756 | netdev_err(netdev, "No memory left for URBs\n"); | ||
| 757 | goto nomem; | 755 | goto nomem; |
| 758 | } | ||
| 759 | 756 | ||
| 760 | buf = usb_alloc_coherent(dev->udev, size, GFP_ATOMIC, &urb->transfer_dma); | 757 | buf = usb_alloc_coherent(dev->udev, size, GFP_ATOMIC, &urb->transfer_dma); |
| 761 | if (!buf) { | 758 | if (!buf) { |
| @@ -1007,10 +1004,8 @@ static int ems_usb_probe(struct usb_interface *intf, | |||
| 1007 | dev->tx_contexts[i].echo_index = MAX_TX_URBS; | 1004 | dev->tx_contexts[i].echo_index = MAX_TX_URBS; |
| 1008 | 1005 | ||
| 1009 | dev->intr_urb = usb_alloc_urb(0, GFP_KERNEL); | 1006 | dev->intr_urb = usb_alloc_urb(0, GFP_KERNEL); |
| 1010 | if (!dev->intr_urb) { | 1007 | if (!dev->intr_urb) |
| 1011 | dev_err(&intf->dev, "Couldn't alloc intr URB\n"); | ||
| 1012 | goto cleanup_candev; | 1008 | goto cleanup_candev; |
| 1013 | } | ||
| 1014 | 1009 | ||
| 1015 | dev->intr_in_buffer = kzalloc(INTR_IN_BUFFER_SIZE, GFP_KERNEL); | 1010 | dev->intr_in_buffer = kzalloc(INTR_IN_BUFFER_SIZE, GFP_KERNEL); |
| 1016 | if (!dev->intr_in_buffer) | 1011 | if (!dev->intr_in_buffer) |
