Commit 7fe7cfa4 authored by Wolfram Sang's avatar Wolfram Sang Committed by David S. Miller

net: can: usb: usb_8dev: don't print error when allocating urb fails

kmalloc will print enough information in case of failure.
Signed-off-by: default avatarWolfram Sang <wsa-dev@sang-engineering.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2479204b
...@@ -623,10 +623,8 @@ static netdev_tx_t usb_8dev_start_xmit(struct sk_buff *skb, ...@@ -623,10 +623,8 @@ static netdev_tx_t usb_8dev_start_xmit(struct sk_buff *skb,
/* create a URB, and a buffer for it, and copy the data to the URB */ /* create a URB, and a buffer for it, and copy the data to the URB */
urb = usb_alloc_urb(0, GFP_ATOMIC); urb = usb_alloc_urb(0, GFP_ATOMIC);
if (!urb) { if (!urb)
netdev_err(netdev, "No memory left for URBs\n");
goto nomem; goto nomem;
}
buf = usb_alloc_coherent(priv->udev, size, GFP_ATOMIC, buf = usb_alloc_coherent(priv->udev, size, GFP_ATOMIC,
&urb->transfer_dma); &urb->transfer_dma);
...@@ -748,7 +746,6 @@ static int usb_8dev_start(struct usb_8dev_priv *priv) ...@@ -748,7 +746,6 @@ static int usb_8dev_start(struct usb_8dev_priv *priv)
/* create a URB, and a buffer for it */ /* create a URB, and a buffer for it */
urb = usb_alloc_urb(0, GFP_KERNEL); urb = usb_alloc_urb(0, GFP_KERNEL);
if (!urb) { if (!urb) {
netdev_err(netdev, "No memory left for URBs\n");
err = -ENOMEM; err = -ENOMEM;
break; break;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment