gpio: merrifield: Delete an error message for a failed memory allocation in mrfld_gpio_probe()
PATCH 1/1 gpio: merrifield: Delete an error message for a failed memory allocation in mrfld_gpio_probe()
From: Markus Elfring <[email protected]>
Date: Sun, 11 Feb 2018 13:30:14 +0100
Omit an extra message for a memory allocation failure in this function.
This issue was detected by using the Coccinelle software.
--- drivers/gpio/gpio-merrifield.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/gpio/gpio-merrifield.c +1 -3
@@ -408,10 +408,8 @@ static int mrfld_gpio_probe(struct pci_dev *pdev, const struct pci_device_id *idpcim_iounmap_regions (pdev,BIT (1 )); priv =devm_kzalloc (&pdev->dev,sizeof (*priv),GFP_KERNEL ); -if (!priv) { -dev_err (&pdev->dev,"can't allocate chip data\n" ); +if (!priv)return -ENOMEM ; - } priv->dev = &pdev->dev; priv->reg_base =pcim_iomap_table (pdev)[0 ];
Signature · 1 line
2.16.1
Quoted 8 lines · SF Markus Elfring
From: Markus Elfring <[email protected]>
Date: Sun, 11 Feb 2018 13:30:14 +0100Omit an extra message for a memory allocation failure in this function.
This issue was detected by using the Coccinelle software.
Linus, I have no strong opinion here, so, up to you to decide.
If you decide this patch to go,
Quoted 23 lines
Signed-off-by Markus Elfring <[email protected]>--- drivers/gpio/gpio-merrifield.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)drivers/gpio/gpio- renamed from drivers/gpio/gpio-merrifield.c +0
-0
merrifield.c
indexdd67a31ac337..eec21122299e100644drivers/gpio/gpio-merrifield.c +0
-0@@ -408,10 +408,8 @@ static int mrfld_gpio_probe(struct pci_dev *pdev,const struct
pci_device_id*iddrivers/gpio/gpio-merrifield.c +1
-3pcim_iounmap_regions (pdev,BIT (1 )); priv =devm_kzalloc (&pdev->dev,sizeof (*priv),GFP_KERNEL ); -if (!priv) { -dev_err (&pdev->dev,"can't allocate chip data\n" ); +if (!priv)return -ENOMEM ; - } priv->dev = &pdev->dev; priv->reg_base =pcim_iomap_table (pdev)[0 ];
Signature · 2 lines
Andy Shevchenko <[email protected]> Intel Finland Oy
Quoted 8 lines · SF Markus Elfring
From: Markus Elfring <[email protected]>
Date: Sun, 11 Feb 2018 13:30:14 +0100Omit an extra message for a memory allocation failure in this function.
This issue was detected by using the Coccinelle software.
Signed-off-by Markus Elfring <[email protected]>
Patch applied.
Yours,
Linus Walleij