diff options
-rw-r--r-- | drivers/power/supply/gpio-charger.c | 4 |
1 files changed, 1 insertions, 3 deletions
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 |