From 09da6c5f60ad2e2018366e47192a9ddbccfb3ac5 Mon Sep 17 00:00:00 2001 From: Joe Perches Date: Sun, 3 Feb 2013 17:28:09 +0000 Subject: can: Remove unnecessary alloc/OOM messages alloc failures already get standardized OOM messages and a dump_stack. Signed-off-by: Joe Perches Acked-by: Marc Kleine-Budde Signed-off-by: David S. Miller --- drivers/net/can/sja1000/ems_pci.c | 1 - drivers/net/can/sja1000/peak_pci.c | 5 +---- drivers/net/can/sja1000/peak_pcmcia.c | 1 - drivers/net/can/sja1000/plx_pci.c | 1 - 4 files changed, 1 insertion(+), 7 deletions(-) (limited to 'drivers/net/can/sja1000') 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, /* Allocating card structures to hold addresses, ... */ card = kzalloc(sizeof(struct ems_pci_card), GFP_KERNEL); if (card == NULL) { - dev_err(&pdev->dev, "Unable to allocate memory\n"); pci_disable_device(pdev); return -ENOMEM; } 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) } else { /* create the bit banging I2C adapter structure */ card = kzalloc(sizeof(struct peak_pciec_card), GFP_KERNEL); - if (!card) { - dev_err(&pdev->dev, - "failed allocating memory for i2c chip\n"); + if (!card) return -ENOMEM; - } card->cfg_base = chan->cfg_base; 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) card = kzalloc(sizeof(struct pcan_pccard), GFP_KERNEL); if (!card) { - dev_err(&pdev->dev, "couldn't allocate card memory\n"); err = -ENOMEM; goto probe_err_2; } 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, /* Allocate card structures to hold addresses, ... */ card = kzalloc(sizeof(*card), GFP_KERNEL); if (!card) { - dev_err(&pdev->dev, "Unable to allocate memory\n"); pci_disable_device(pdev); return -ENOMEM; } -- cgit