Commit 3e342770 authored by Markus Elfring's avatar Markus Elfring Committed by Tejun Heo

pata_macio: Delete an error message for a failed memory allocation in two functions

Omit an extra message for a memory allocation failure in these functions.

This issue was detected by using the Coccinelle software.
Signed-off-by: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
parent 533013d6
...@@ -1131,11 +1131,9 @@ static int pata_macio_attach(struct macio_dev *mdev, ...@@ -1131,11 +1131,9 @@ static int pata_macio_attach(struct macio_dev *mdev,
/* Allocate and init private data structure */ /* Allocate and init private data structure */
priv = devm_kzalloc(&mdev->ofdev.dev, priv = devm_kzalloc(&mdev->ofdev.dev,
sizeof(struct pata_macio_priv), GFP_KERNEL); sizeof(struct pata_macio_priv), GFP_KERNEL);
if (priv == NULL) { if (!priv)
dev_err(&mdev->ofdev.dev,
"Failed to allocate private memory\n");
return -ENOMEM; return -ENOMEM;
}
priv->node = of_node_get(mdev->ofdev.dev.of_node); priv->node = of_node_get(mdev->ofdev.dev.of_node);
priv->mdev = mdev; priv->mdev = mdev;
priv->dev = &mdev->ofdev.dev; priv->dev = &mdev->ofdev.dev;
...@@ -1277,11 +1275,9 @@ static int pata_macio_pci_attach(struct pci_dev *pdev, ...@@ -1277,11 +1275,9 @@ static int pata_macio_pci_attach(struct pci_dev *pdev,
/* Allocate and init private data structure */ /* Allocate and init private data structure */
priv = devm_kzalloc(&pdev->dev, priv = devm_kzalloc(&pdev->dev,
sizeof(struct pata_macio_priv), GFP_KERNEL); sizeof(struct pata_macio_priv), GFP_KERNEL);
if (priv == NULL) { if (!priv)
dev_err(&pdev->dev,
"Failed to allocate private memory\n");
return -ENOMEM; return -ENOMEM;
}
priv->node = of_node_get(np); priv->node = of_node_get(np);
priv->pdev = pdev; priv->pdev = pdev;
priv->dev = &pdev->dev; priv->dev = &pdev->dev;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment