diff options
-rw-r--r-- | drivers/net/can/sja1000/ems_pci.c | 1 | ||||
-rw-r--r-- | drivers/net/can/sja1000/peak_pci.c | 5 | ||||
-rw-r--r-- | drivers/net/can/sja1000/peak_pcmcia.c | 1 | ||||
-rw-r--r-- | drivers/net/can/sja1000/plx_pci.c | 1 | ||||
-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 |
8 files changed, 3 insertions, 20 deletions
diff --git a/drivers/net/can/sja1000/ems_pci.c b/drivers/net/can/sja1000/ems_pci.c index 036a326836b2..36d298da2af6 100644 --- a/drivers/net/can/sja1000/ems_pci.c +++ b/drivers/net/can/sja1000/ems_pci.c | |||
@@ -238,7 +238,6 @@ static int ems_pci_add_card(struct pci_dev *pdev, | |||
238 | /* Allocating card structures to hold addresses, ... */ | 238 | /* Allocating card structures to hold addresses, ... */ |
239 | card = kzalloc(sizeof(struct ems_pci_card), GFP_KERNEL); | 239 | card = kzalloc(sizeof(struct ems_pci_card), GFP_KERNEL); |
240 | if (card == NULL) { | 240 | if (card == NULL) { |
241 | dev_err(&pdev->dev, "Unable to allocate memory\n"); | ||
242 | pci_disable_device(pdev); | 241 | pci_disable_device(pdev); |
243 | return -ENOMEM; | 242 | return -ENOMEM; |
244 | } | 243 | } |
diff --git a/drivers/net/can/sja1000/peak_pci.c b/drivers/net/can/sja1000/peak_pci.c index d84888f03d92..44406a4839f6 100644 --- a/drivers/net/can/sja1000/peak_pci.c +++ b/drivers/net/can/sja1000/peak_pci.c | |||
@@ -451,11 +451,8 @@ static int peak_pciec_probe(struct pci_dev *pdev, struct net_device *dev) | |||
451 | } else { | 451 | } else { |
452 | /* create the bit banging I2C adapter structure */ | 452 | /* create the bit banging I2C adapter structure */ |
453 | card = kzalloc(sizeof(struct peak_pciec_card), GFP_KERNEL); | 453 | card = kzalloc(sizeof(struct peak_pciec_card), GFP_KERNEL); |
454 | if (!card) { | 454 | if (!card) |
455 | dev_err(&pdev->dev, | ||
456 | "failed allocating memory for i2c chip\n"); | ||
457 | return -ENOMEM; | 455 | return -ENOMEM; |
458 | } | ||
459 | 456 | ||
460 | card->cfg_base = chan->cfg_base; | 457 | card->cfg_base = chan->cfg_base; |
461 | card->reg_base = priv->reg_base; | 458 | card->reg_base = priv->reg_base; |
diff --git a/drivers/net/can/sja1000/peak_pcmcia.c b/drivers/net/can/sja1000/peak_pcmcia.c index f1175142b0a0..1a7020ba37f5 100644 --- a/drivers/net/can/sja1000/peak_pcmcia.c +++ b/drivers/net/can/sja1000/peak_pcmcia.c | |||
@@ -660,7 +660,6 @@ static int pcan_probe(struct pcmcia_device *pdev) | |||
660 | 660 | ||
661 | card = kzalloc(sizeof(struct pcan_pccard), GFP_KERNEL); | 661 | card = kzalloc(sizeof(struct pcan_pccard), GFP_KERNEL); |
662 | if (!card) { | 662 | if (!card) { |
663 | dev_err(&pdev->dev, "couldn't allocate card memory\n"); | ||
664 | err = -ENOMEM; | 663 | err = -ENOMEM; |
665 | goto probe_err_2; | 664 | goto probe_err_2; |
666 | } | 665 | } |
diff --git a/drivers/net/can/sja1000/plx_pci.c b/drivers/net/can/sja1000/plx_pci.c index 11d1062a9449..a042cdc260dc 100644 --- a/drivers/net/can/sja1000/plx_pci.c +++ b/drivers/net/can/sja1000/plx_pci.c | |||
@@ -508,7 +508,6 @@ static int plx_pci_add_card(struct pci_dev *pdev, | |||
508 | /* Allocate card structures to hold addresses, ... */ | 508 | /* Allocate card structures to hold addresses, ... */ |
509 | card = kzalloc(sizeof(*card), GFP_KERNEL); | 509 | card = kzalloc(sizeof(*card), GFP_KERNEL); |
510 | if (!card) { | 510 | if (!card) { |
511 | dev_err(&pdev->dev, "Unable to allocate memory\n"); | ||
512 | pci_disable_device(pdev); | 511 | pci_disable_device(pdev); |
513 | return -ENOMEM; | 512 | return -ENOMEM; |
514 | } | 513 | } |
diff --git a/drivers/net/can/usb/ems_usb.c b/drivers/net/can/usb/ems_usb.c index c69f0b72b352..0e7bde73c3d2 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, | |||
1014 | } | 1014 | } |
1015 | 1015 | ||
1016 | dev->intr_in_buffer = kzalloc(INTR_IN_BUFFER_SIZE, GFP_KERNEL); | 1016 | dev->intr_in_buffer = kzalloc(INTR_IN_BUFFER_SIZE, GFP_KERNEL); |
1017 | if (!dev->intr_in_buffer) { | 1017 | if (!dev->intr_in_buffer) |
1018 | dev_err(&intf->dev, "Couldn't alloc Intr buffer\n"); | ||
1019 | goto cleanup_intr_urb; | 1018 | goto cleanup_intr_urb; |
1020 | } | ||
1021 | 1019 | ||
1022 | dev->tx_msg_buffer = kzalloc(CPC_HEADER_SIZE + | 1020 | dev->tx_msg_buffer = kzalloc(CPC_HEADER_SIZE + |
1023 | sizeof(struct ems_cpc_msg), GFP_KERNEL); | 1021 | 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 5b58a4d87397..45cb9f3c1324 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, | |||
561 | 561 | ||
562 | buf = kmalloc(sizeof(struct kvaser_msg), GFP_ATOMIC); | 562 | buf = kmalloc(sizeof(struct kvaser_msg), GFP_ATOMIC); |
563 | if (!buf) { | 563 | if (!buf) { |
564 | netdev_err(netdev, "No memory left for USB buffer\n"); | ||
565 | usb_free_urb(urb); | 564 | usb_free_urb(urb); |
566 | return -ENOMEM; | 565 | return -ENOMEM; |
567 | } | 566 | } |
@@ -1268,7 +1267,6 @@ static netdev_tx_t kvaser_usb_start_xmit(struct sk_buff *skb, | |||
1268 | 1267 | ||
1269 | buf = kmalloc(sizeof(struct kvaser_msg), GFP_ATOMIC); | 1268 | buf = kmalloc(sizeof(struct kvaser_msg), GFP_ATOMIC); |
1270 | if (!buf) { | 1269 | if (!buf) { |
1271 | netdev_err(netdev, "No memory left for USB buffer\n"); | ||
1272 | stats->tx_dropped++; | 1270 | stats->tx_dropped++; |
1273 | goto nobufmem; | 1271 | goto nobufmem; |
1274 | } | 1272 | } |
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 d9290ea788e0..a0f647f92bf5 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) | |||
386 | 386 | ||
387 | buf = kmalloc(dev->adapter->rx_buffer_size, GFP_KERNEL); | 387 | buf = kmalloc(dev->adapter->rx_buffer_size, GFP_KERNEL); |
388 | if (!buf) { | 388 | if (!buf) { |
389 | netdev_err(netdev, "No memory left for USB buffer\n"); | ||
390 | usb_free_urb(urb); | 389 | usb_free_urb(urb); |
391 | err = -ENOMEM; | 390 | err = -ENOMEM; |
392 | break; | 391 | break; |
@@ -442,7 +441,6 @@ static int peak_usb_start(struct peak_usb_device *dev) | |||
442 | 441 | ||
443 | buf = kmalloc(dev->adapter->tx_buffer_size, GFP_KERNEL); | 442 | buf = kmalloc(dev->adapter->tx_buffer_size, GFP_KERNEL); |
444 | if (!buf) { | 443 | if (!buf) { |
445 | netdev_err(netdev, "No memory left for USB buffer\n"); | ||
446 | usb_free_urb(urb); | 444 | usb_free_urb(urb); |
447 | err = -ENOMEM; | 445 | err = -ENOMEM; |
448 | break; | 446 | break; |
@@ -634,7 +632,6 @@ static int peak_usb_restart(struct peak_usb_device *dev) | |||
634 | /* also allocate enough space for the commands to send */ | 632 | /* also allocate enough space for the commands to send */ |
635 | buf = kmalloc(PCAN_USB_MAX_CMD_LEN, GFP_ATOMIC); | 633 | buf = kmalloc(PCAN_USB_MAX_CMD_LEN, GFP_ATOMIC); |
636 | if (!buf) { | 634 | if (!buf) { |
637 | netdev_err(dev->netdev, "no memory left for async cmd\n"); | ||
638 | usb_free_urb(urb); | 635 | usb_free_urb(urb); |
639 | return -ENOMEM; | 636 | return -ENOMEM; |
640 | } | 637 | } |
@@ -729,8 +726,6 @@ static int peak_usb_create_dev(struct peak_usb_adapter *peak_usb_adapter, | |||
729 | /* allocate a buffer large enough to send commands */ | 726 | /* allocate a buffer large enough to send commands */ |
730 | dev->cmd_buf = kmalloc(PCAN_USB_MAX_CMD_LEN, GFP_KERNEL); | 727 | dev->cmd_buf = kmalloc(PCAN_USB_MAX_CMD_LEN, GFP_KERNEL); |
731 | if (!dev->cmd_buf) { | 728 | if (!dev->cmd_buf) { |
732 | dev_err(&intf->dev, "%s: couldn't alloc cmd buffer\n", | ||
733 | PCAN_USB_DRIVER_NAME); | ||
734 | err = -ENOMEM; | 729 | err = -ENOMEM; |
735 | goto lbl_set_intf_data; | 730 | goto lbl_set_intf_data; |
736 | } | 731 | } |
diff --git a/drivers/net/can/usb/usb_8dev.c b/drivers/net/can/usb/usb_8dev.c index f789e6f54a55..6e15ef08f301 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, | |||
958 | 958 | ||
959 | priv->cmd_msg_buffer = kzalloc(sizeof(struct usb_8dev_cmd_msg), | 959 | priv->cmd_msg_buffer = kzalloc(sizeof(struct usb_8dev_cmd_msg), |
960 | GFP_KERNEL); | 960 | GFP_KERNEL); |
961 | if (!priv->cmd_msg_buffer) { | 961 | if (!priv->cmd_msg_buffer) |
962 | netdev_err(netdev, "Couldn't alloc Tx buffer\n"); | ||
963 | goto cleanup_candev; | 962 | goto cleanup_candev; |
964 | } | ||
965 | 963 | ||
966 | usb_set_intfdata(intf, priv); | 964 | usb_set_intfdata(intf, priv); |
967 | 965 | ||