gpio: merrifield: Delete an error message
authorMarkus Elfring <elfring@users.sourceforge.net>
Sun, 11 Feb 2018 12:30:14 +0000 (13:30 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Thu, 22 Feb 2018 14:25:40 +0000 (15:25 +0100)
Omit 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 <elfring@users.sourceforge.net>
Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-merrifield.c

index c38624e..97421bd 100644 (file)
@@ -416,10 +416,8 @@ static int mrfld_gpio_probe(struct pci_dev *pdev, const struct pci_device_id *id
        pcim_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];