mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 01:49:46 +00:00
regulator: cros-ec: Fix error code in dev_err message
[ Upstream commit 3d681804ef ]
Show proper error code instead of 0.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Link: https://lore.kernel.org/r/20210512075824.620580-1-axel.lin@ingics.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
95deeb29d8
commit
0ea923519a
@@ -225,8 +225,9 @@ static int cros_ec_regulator_probe(struct platform_device *pdev)
|
|||||||
|
|
||||||
drvdata->dev = devm_regulator_register(dev, &drvdata->desc, &cfg);
|
drvdata->dev = devm_regulator_register(dev, &drvdata->desc, &cfg);
|
||||||
if (IS_ERR(drvdata->dev)) {
|
if (IS_ERR(drvdata->dev)) {
|
||||||
|
ret = PTR_ERR(drvdata->dev);
|
||||||
dev_err(&pdev->dev, "Failed to register regulator: %d\n", ret);
|
dev_err(&pdev->dev, "Failed to register regulator: %d\n", ret);
|
||||||
return PTR_ERR(drvdata->dev);
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
platform_set_drvdata(pdev, drvdata);
|
platform_set_drvdata(pdev, drvdata);
|
||||||
|
|||||||
Reference in New Issue
Block a user