summaryrefslogtreecommitdiffstats
path: root/drivers/power
diff options
context:
space:
mode:
authorBaolin Wang <baolin.wang@linaro.org>2018-11-16 19:01:10 +0800
committerSebastian Reichel <sebastian.reichel@collabora.com>2018-12-05 21:25:01 +0100
commitf25a646fbe2051527ad9721853e892d13a99199e (patch)
tree18fde1857939d94d3f1cdd3ee44548b5db79317d /drivers/power
parent8c13b6f18a6fee9a3128b4db3f68e5fc86a6883e (diff)
downloadlinux-f25a646fbe2051527ad9721853e892d13a99199e.tar.bz2
power: supply: charger-manager: Fix incorrect return value
Fix incorrect return value. Signed-off-by: Baolin Wang <baolin.wang@linaro.org> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Diffstat (limited to 'drivers/power')
-rw-r--r--drivers/power/supply/charger-manager.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/power/supply/charger-manager.c b/drivers/power/supply/charger-manager.c
index bd6c45011ce4..a52bc779e3d1 100644
--- a/drivers/power/supply/charger-manager.c
+++ b/drivers/power/supply/charger-manager.c
@@ -1212,7 +1212,6 @@ static int charger_extcon_init(struct charger_manager *cm,
if (ret < 0) {
pr_info("Cannot register extcon_dev for %s(cable: %s)\n",
cable->extcon_name, cable->name);
- ret = -EINVAL;
}
return ret;
@@ -1633,7 +1632,7 @@ static int charger_manager_probe(struct platform_device *pdev)
if (IS_ERR(desc)) {
dev_err(&pdev->dev, "No platform data (desc) found\n");
- return -ENODEV;
+ return PTR_ERR(desc);
}
cm = devm_kzalloc(&pdev->dev, sizeof(*cm), GFP_KERNEL);