diff mbox series

[BACKPORT,4.14.y,8/8] power: supply: charger-manager: Fix incorrect return value

Message ID 20190322161727.1153278-9-arnd@arndb.de
State New
Headers show
Series [BACKPORT,4.14.y,1/8] scsi: ufs: fix wrong command type of UTRD for UFSHCI v2.1 | expand

Commit Message

Arnd Bergmann March 22, 2019, 4:17 p.m. UTC
From: Baolin Wang <baolin.wang@linaro.org>


Fix incorrect return value.

Signed-off-by: Baolin Wang <baolin.wang@linaro.org>

Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>

(cherry picked from commit f25a646fbe2051527ad9721853e892d13a99199e)
Signed-off-by: Arnd Bergmann <arnd@arndb.de>

---
 drivers/power/supply/charger-manager.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

-- 
2.20.0
diff mbox series

Patch

diff --git a/drivers/power/supply/charger-manager.c b/drivers/power/supply/charger-manager.c
index 6502fa7c2106..f60dfc213257 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;
@@ -1629,7 +1628,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);