diff options
author | Wolfram Sang <wsa-dev@sang-engineering.com> | 2016-08-11 23:05:24 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-08-13 23:53:39 +0200 |
commit | 2479204b256392a170ba819411b14c3da0bee1b5 (patch) | |
tree | 6bf0c8ab373f0f85f591360ba3f4218ad09f559d /drivers/net/can | |
parent | net: can: usb: kvaser_usb: don't print error when allocating urb fails (diff) | |
download | linux-2479204b256392a170ba819411b14c3da0bee1b5.tar.xz linux-2479204b256392a170ba819411b14c3da0bee1b5.zip |
net: can: usb: peak_usb: pcan_usb_core: 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')
-rw-r--r-- | drivers/net/can/usb/peak_usb/pcan_usb_core.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/net/can/usb/peak_usb/pcan_usb_core.c b/drivers/net/can/usb/peak_usb/pcan_usb_core.c index bfb91d8fa460..c06382cdfdfe 100644 --- a/drivers/net/can/usb/peak_usb/pcan_usb_core.c +++ b/drivers/net/can/usb/peak_usb/pcan_usb_core.c @@ -399,7 +399,6 @@ static int peak_usb_start(struct peak_usb_device *dev) /* create a URB, and a buffer for it, to receive usb messages */ urb = usb_alloc_urb(0, GFP_KERNEL); if (!urb) { - netdev_err(netdev, "No memory left for URBs\n"); err = -ENOMEM; break; } @@ -454,7 +453,6 @@ static int peak_usb_start(struct peak_usb_device *dev) /* create a URB and a buffer for it, to transmit usb messages */ urb = usb_alloc_urb(0, GFP_KERNEL); if (!urb) { - netdev_err(netdev, "No memory left for URBs\n"); err = -ENOMEM; break; } @@ -651,10 +649,8 @@ static int peak_usb_restart(struct peak_usb_device *dev) /* first allocate a urb to handle the asynchronous steps */ urb = usb_alloc_urb(0, GFP_ATOMIC); - if (!urb) { - netdev_err(dev->netdev, "no memory left for urb\n"); + if (!urb) return -ENOMEM; - } /* also allocate enough space for the commands to send */ buf = kmalloc(PCAN_USB_MAX_CMD_LEN, GFP_ATOMIC); |