Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2a4a1e40 authored by Wolfram Sang's avatar Wolfram Sang Committed by David S. Miller
Browse files

net: can: usb: gs_usb: 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 912f85e1
Loading
Loading
Loading
Loading
+2 −7
Original line number Diff line number Diff line
@@ -493,10 +493,8 @@ static netdev_tx_t gs_can_start_xmit(struct sk_buff *skb,

	/* create a URB, and a buffer for it */
	urb = usb_alloc_urb(0, GFP_ATOMIC);
	if (!urb) {
		netdev_err(netdev, "No memory left for URB\n");
	if (!urb)
		goto nomem_urb;
	}

	hf = usb_alloc_coherent(dev->udev, sizeof(*hf), GFP_ATOMIC,
				&urb->transfer_dma);
@@ -600,11 +598,8 @@ static int gs_can_open(struct net_device *netdev)

			/* alloc rx urb */
			urb = usb_alloc_urb(0, GFP_KERNEL);
			if (!urb) {
				netdev_err(netdev,
					   "No memory left for URB\n");
			if (!urb)
				return -ENOMEM;
			}

			/* alloc rx buffer */
			buf = usb_alloc_coherent(dev->udev,