power: supply: gpio-charger: Remove redundant dev_err call in probe function
authorLadislav Michl <ladis@linux-mips.org>
Mon, 5 Mar 2018 18:04:14 +0000 (19:04 +0100)
committerSebastian Reichel <sebastian.reichel@collabora.co.uk>
Fri, 9 Mar 2018 15:14:02 +0000 (16:14 +0100)
There is an error message within devm_kzalloc already.

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
drivers/power/supply/gpio-charger.c

index f0d8cc1..78b5556 100644 (file)
@@ -137,10 +137,8 @@ static int gpio_charger_probe(struct platform_device *pdev)
        }
 
        gpio_charger = devm_kzalloc(dev, sizeof(*gpio_charger), GFP_KERNEL);
-       if (!gpio_charger) {
-               dev_err(dev, "Failed to alloc driver structure\n");
+       if (!gpio_charger)
                return -ENOMEM;
-       }
 
        /*
         * This will fetch a GPIO descriptor from device tree, ACPI or