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

commit f25a646fbe upstream.

Fix incorrect return value.

Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Baolin Wang 2018-11-16 19:01:10 +08:00 committed by Greg Kroah-Hartman
parent 40616958fe
commit d746cb4215

View File

@ -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;
@ -1634,7 +1633,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,