regulator: cros-ec: Fix error code in dev_err message
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>
This commit is contained in:
parent
f80505fdff
commit
3d681804ef
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user