summaryrefslogtreecommitdiffstats
path: root/drivers/power
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2016-12-29 15:23:12 +0000
committerSebastian Reichel <sre@kernel.org>2017-01-04 22:04:20 +0100
commite3e774186d2c011680516b5c65d8197a2b489555 (patch)
tree6dea0f34476755489961da58efb222642b4fd280 /drivers/power
parent1169735dc26c2c9a8e94efc5f66c2c95ce4fce14 (diff)
downloadblackbird-op-linux-e3e774186d2c011680516b5c65d8197a2b489555.tar.gz
blackbird-op-linux-e3e774186d2c011680516b5c65d8197a2b489555.zip
power: supply: wm97xx_battery: remove redundant 2nd null check on pdata
pdata is being null checked twice, the 2nd check is redundant code and can be removed. Fixes CoverityScan CID 1392340 "Logically dead code" Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
Diffstat (limited to 'drivers/power')
-rw-r--r--drivers/power/supply/wm97xx_battery.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/power/supply/wm97xx_battery.c b/drivers/power/supply/wm97xx_battery.c
index e3edb31ac880..bd4f66651513 100644
--- a/drivers/power/supply/wm97xx_battery.c
+++ b/drivers/power/supply/wm97xx_battery.c
@@ -175,11 +175,6 @@ static int wm97xx_bat_probe(struct platform_device *dev)
if (dev->id != -1)
return -EINVAL;
- if (!pdata) {
- dev_err(&dev->dev, "No platform_data supplied\n");
- return -EINVAL;
- }
-
if (gpio_is_valid(pdata->charge_gpio)) {
ret = gpio_request(pdata->charge_gpio, "BATT CHRG");
if (ret)
OpenPOWER on IntegriCloud