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>
This commit is contained in:

committed by
David S. Miller

parent
ad4437d4ed
commit
09da6c5f60
@@ -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;
|
||||
}
|
||||
|
@@ -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;
|
||||
|
@@ -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;
|
||||
}
|
||||
|
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user