net: can: usb: kvaser_usb: don't print error when allocating urb fails
authorWolfram Sang <wsa-dev@sang-engineering.com>
Thu, 11 Aug 2016 21:05:23 +0000 (23:05 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sat, 13 Aug 2016 21:53:39 +0000 (14:53 -0700)
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>
drivers/net/can/usb/kvaser_usb.c

index 6f1f3b675ff553a96d4342b619e34a606fa9be29..d51e0c401b483cbef83caabdf5b92064e5b98b84 100644 (file)
@@ -787,10 +787,8 @@ static int kvaser_usb_simple_msg_async(struct kvaser_usb_net_priv *priv,
        int err;
 
        urb = usb_alloc_urb(0, GFP_ATOMIC);
-       if (!urb) {
-               netdev_err(netdev, "No memory left for URBs\n");
+       if (!urb)
                return -ENOMEM;
-       }
 
        buf = kmalloc(sizeof(struct kvaser_msg), GFP_ATOMIC);
        if (!buf) {
@@ -1393,8 +1391,6 @@ static int kvaser_usb_setup_rx_urbs(struct kvaser_usb *dev)
 
                urb = usb_alloc_urb(0, GFP_KERNEL);
                if (!urb) {
-                       dev_warn(dev->udev->dev.parent,
-                                "No memory left for URBs\n");
                        err = -ENOMEM;
                        break;
                }
@@ -1670,7 +1666,6 @@ static netdev_tx_t kvaser_usb_start_xmit(struct sk_buff *skb,
 
        urb = usb_alloc_urb(0, GFP_ATOMIC);
        if (!urb) {
-               netdev_err(netdev, "No memory left for URBs\n");
                stats->tx_dropped++;
                dev_kfree_skb(skb);
                return NETDEV_TX_OK;