summaryrefslogtreecommitdiff
path: root/drivers/power
diff options
context:
space:
mode:
authorLadislav Michl <ladis@linux-mips.org>2018-03-05 21:04:14 +0300
committerSebastian Reichel <sebastian.reichel@collabora.co.uk>2018-03-09 18:14:02 +0300
commitd433d04bb70085ceea2815cdb879d4e6fae470d9 (patch)
tree13cefabba83687b0e77685b9f9371576c220d06c /drivers/power
parent416a1ae673db0918fbe6707c7d6f4459598e2c65 (diff)
downloadlinux-d433d04bb70085ceea2815cdb879d4e6fae470d9.tar.xz
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 <ladis@linux-mips.org> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Diffstat (limited to 'drivers/power')
-rw-r--r--drivers/power/supply/gpio-charger.c4
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