2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-26 06:04:14 +08:00

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>
This commit is contained in:
Ladislav Michl 2018-03-05 19:04:14 +01:00 committed by Sebastian Reichel
parent 416a1ae673
commit d433d04bb7

View 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