gpio-intel-mid: Delete an error message
authorMarkus Elfring <elfring@users.sourceforge.net>
Sun, 11 Feb 2018 20:56:42 +0000 (21:56 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Thu, 22 Feb 2018 14:29:05 +0000 (15:29 +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>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-intel-mid.c

index 629575e..028d64c 100644 (file)
@@ -361,10 +361,8 @@ static int intel_gpio_probe(struct pci_dev *pdev,
        pcim_iounmap_regions(pdev, 1 << 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->reg_base = pcim_iomap_table(pdev)[0];
        priv->chip.label = dev_name(&pdev->dev);