From d433d04bb70085ceea2815cdb879d4e6fae470d9 Mon Sep 17 00:00:00 2001 From: Ladislav Michl Date: Mon, 5 Mar 2018 19:04:14 +0100 Subject: power: supply: gpio-charger: Remove redundant dev_err call in probe function There is an error message within devm_kzalloc already. Signed-off-by: Ladislav Michl Signed-off-by: Sebastian Reichel --- drivers/power/supply/gpio-charger.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'drivers/power/supply/gpio-charger.c') diff --git a/drivers/power/supply/gpio-charger.c b/drivers/power/supply/gpio-charger.c index f0d8cc19ad1e..78b55566e215 100644 --- a/drivers/power/supply/gpio-charger.c +++ b/drivers/power/supply/gpio-charger.c @@ -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 -- cgit v1.2.3