diff options
author | Joe Perches <joe@perches.com> | 2013-02-03 17:28:09 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-02-04 13:22:33 -0500 |
commit | 09da6c5f60ad2e2018366e47192a9ddbccfb3ac5 (patch) | |
tree | e257e02cf65564724fe6b40dc4406ad92f9bd850 /drivers/net/can/usb | |
parent | ad4437d4edeabe6a8d34f8cb3865be005ded6a1e (diff) |
can: Remove unnecessary alloc/OOM messages
alloc failures already get standardized OOM
messages and a dump_stack.
Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Marc Kleine-Budde <mkl@pengutronix.de>
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 | 4 | ||||
-rw-r--r-- | drivers/net/can/usb/kvaser_usb.c | 2 | ||||
-rw-r--r-- | drivers/net/can/usb/peak_usb/pcan_usb_core.c | 5 | ||||
-rw-r--r-- | drivers/net/can/usb/usb_8dev.c | 4 |
4 files changed, 2 insertions, 13 deletions
diff --git a/drivers/net/can/usb/ems_usb.c b/drivers/net/can/usb/ems_usb.c index c69f0b72b35..0e7bde73c3d 100644 --- a/drivers/net/can/usb/ems_usb.c +++ b/drivers/net/can/usb/ems_usb.c @@ -1014,10 +1014,8 @@ static int ems_usb_probe(struct usb_interface *intf, } dev->intr_in_buffer = kzalloc(INTR_IN_BUFFER_SIZE, GFP_KERNEL); - if (!dev->intr_in_buffer) { - dev_err(&intf->dev, "Couldn't alloc Intr buffer\n"); + if (!dev->intr_in_buffer) goto cleanup_intr_urb; - } dev->tx_msg_buffer = kzalloc(CPC_HEADER_SIZE + sizeof(struct ems_cpc_msg), GFP_KERNEL); diff --git a/drivers/net/can/usb/kvaser_usb.c b/drivers/net/can/usb/kvaser_usb.c index 5b58a4d8739..45cb9f3c132 100644 --- a/drivers/net/can/usb/kvaser_usb.c +++ b/drivers/net/can/usb/kvaser_usb.c @@ -561,7 +561,6 @@ static int kvaser_usb_simple_msg_async(struct kvaser_usb_net_priv *priv, buf = kmalloc(sizeof(struct kvaser_msg), GFP_ATOMIC); if (!buf) { - netdev_err(netdev, "No memory left for USB buffer\n"); usb_free_urb(urb); return -ENOMEM; } @@ -1268,7 +1267,6 @@ static netdev_tx_t kvaser_usb_start_xmit(struct sk_buff *skb, buf = kmalloc(sizeof(struct kvaser_msg), GFP_ATOMIC); if (!buf) { - netdev_err(netdev, "No memory left for USB buffer\n"); stats->tx_dropped++; goto nobufmem; } 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 d9290ea788e..a0f647f92bf 100644 --- a/drivers/net/can/usb/peak_usb/pcan_usb_core.c +++ b/drivers/net/can/usb/peak_usb/pcan_usb_core.c @@ -386,7 +386,6 @@ static int peak_usb_start(struct peak_usb_device *dev) buf = kmalloc(dev->adapter->rx_buffer_size, GFP_KERNEL); if (!buf) { - netdev_err(netdev, "No memory left for USB buffer\n"); usb_free_urb(urb); err = -ENOMEM; break; @@ -442,7 +441,6 @@ static int peak_usb_start(struct peak_usb_device *dev) buf = kmalloc(dev->adapter->tx_buffer_size, GFP_KERNEL); if (!buf) { - netdev_err(netdev, "No memory left for USB buffer\n"); usb_free_urb(urb); err = -ENOMEM; break; @@ -634,7 +632,6 @@ static int peak_usb_restart(struct peak_usb_device *dev) /* also allocate enough space for the commands to send */ buf = kmalloc(PCAN_USB_MAX_CMD_LEN, GFP_ATOMIC); if (!buf) { - netdev_err(dev->netdev, "no memory left for async cmd\n"); usb_free_urb(urb); return -ENOMEM; } @@ -729,8 +726,6 @@ static int peak_usb_create_dev(struct peak_usb_adapter *peak_usb_adapter, /* allocate a buffer large enough to send commands */ dev->cmd_buf = kmalloc(PCAN_USB_MAX_CMD_LEN, GFP_KERNEL); if (!dev->cmd_buf) { - dev_err(&intf->dev, "%s: couldn't alloc cmd buffer\n", - PCAN_USB_DRIVER_NAME); err = -ENOMEM; goto lbl_set_intf_data; } diff --git a/drivers/net/can/usb/usb_8dev.c b/drivers/net/can/usb/usb_8dev.c index f789e6f54a5..6e15ef08f30 100644 --- a/drivers/net/can/usb/usb_8dev.c +++ b/drivers/net/can/usb/usb_8dev.c @@ -958,10 +958,8 @@ static int usb_8dev_probe(struct usb_interface *intf, priv->cmd_msg_buffer = kzalloc(sizeof(struct usb_8dev_cmd_msg), GFP_KERNEL); - if (!priv->cmd_msg_buffer) { - netdev_err(netdev, "Couldn't alloc Tx buffer\n"); + if (!priv->cmd_msg_buffer) goto cleanup_candev; - } usb_set_intfdata(intf, priv); |