gpio: timberdale: Delete an error message
authorMarkus Elfring <elfring@users.sourceforge.net>
Sat, 10 Feb 2018 20:09:08 +0000 (21:09 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Thu, 22 Feb 2018 14:14:03 +0000 (15:14 +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>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-timberdale.c

index 181f86ce00cd46417b717edfdcdfddfee3053db1..ff155e437210399d2eb0f6b2b74415c6b458aef1 100644 (file)
@@ -239,10 +239,9 @@ static int timbgpio_probe(struct platform_device *pdev)
        }
 
        tgpio = devm_kzalloc(dev, sizeof(struct timbgpio), GFP_KERNEL);
-       if (!tgpio) {
-               dev_err(dev, "Memory alloc failed\n");
+       if (!tgpio)
                return -EINVAL;
-       }
+
        tgpio->irq_base = pdata->irq_base;
 
        spin_lock_init(&tgpio->lock);