Commit 69ef9ca4 authored by Baolin Wang's avatar Baolin Wang Committed by Greg Kroah-Hartman

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

commit f25a646fbe2051527ad9721853e892d13a99199e upstream.

Fix incorrect return value.
Signed-off-by: 's avatarBaolin Wang <baolin.wang@linaro.org>
Signed-off-by: 's avatarSebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: 's avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9c5f91cc
......@@ -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);
......
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