aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/can/sja1000
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2013-02-03 12:28:09 -0500
committerDavid S. Miller <davem@davemloft.net>2013-02-04 13:22:33 -0500
commit09da6c5f60ad2e2018366e47192a9ddbccfb3ac5 (patch)
treee257e02cf65564724fe6b40dc4406ad92f9bd850 /drivers/net/can/sja1000
parentad4437d4edeabe6a8d34f8cb3865be005ded6a1e (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/sja1000')
-rw-r--r--drivers/net/can/sja1000/ems_pci.c1
-rw-r--r--drivers/net/can/sja1000/peak_pci.c5
-rw-r--r--drivers/net/can/sja1000/peak_pcmcia.c1
-rw-r--r--drivers/net/can/sja1000/plx_pci.c1
4 files changed, 1 insertions, 7 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 }