Commit 3d681804 authored by Axel Lin's avatar Axel Lin Committed by Mark Brown

regulator: cros-ec: Fix error code in dev_err message

Show proper error code instead of 0.
Signed-off-by: default avatarAxel Lin <axel.lin@ingics.com>
Link: https://lore.kernel.org/r/20210512075824.620580-1-axel.lin@ingics.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent f80505fd
......@@ -225,8 +225,9 @@ static int cros_ec_regulator_probe(struct platform_device *pdev)
drvdata->dev = devm_regulator_register(dev, &drvdata->desc, &cfg);
if (IS_ERR(drvdata->dev)) {
ret = PTR_ERR(drvdata->dev);
dev_err(&pdev->dev, "Failed to register regulator: %d\n", ret);
return PTR_ERR(drvdata->dev);
return ret;
}
platform_set_drvdata(pdev, drvdata);
......
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