Commit f25a646f authored by Baolin Wang's avatar Baolin Wang Committed by Sebastian Reichel

power: supply: charger-manager: Fix incorrect return value

Fix incorrect return value.
Signed-off-by: default avatarBaolin Wang <baolin.wang@linaro.org>
Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
parent 8c13b6f1
...@@ -1212,7 +1212,6 @@ static int charger_extcon_init(struct charger_manager *cm, ...@@ -1212,7 +1212,6 @@ static int charger_extcon_init(struct charger_manager *cm,
if (ret < 0) { if (ret < 0) {
pr_info("Cannot register extcon_dev for %s(cable: %s)\n", pr_info("Cannot register extcon_dev for %s(cable: %s)\n",
cable->extcon_name, cable->name); cable->extcon_name, cable->name);
ret = -EINVAL;
} }
return ret; return ret;
...@@ -1633,7 +1632,7 @@ static int charger_manager_probe(struct platform_device *pdev) ...@@ -1633,7 +1632,7 @@ static int charger_manager_probe(struct platform_device *pdev)
if (IS_ERR(desc)) { if (IS_ERR(desc)) {
dev_err(&pdev->dev, "No platform data (desc) found\n"); 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); cm = devm_kzalloc(&pdev->dev, sizeof(*cm), GFP_KERNEL);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment