Commit f39f8709 authored by Sebastian Reichel's avatar Sebastian Reichel Committed by Mark Brown

regulator: rk808: Use dev_err_probe

Print error message for potential EPROBE_DEFER error using
dev_err_probe, which captures the reason in
/sys/kernel/debug/devices_deferred and otherwise silences
the message.
Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
Link: https://lore.kernel.org/r/20221020204251.108565-12-sebastian.reichel@collabora.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 647e5735
......@@ -1343,11 +1343,9 @@ static int rk808_regulator_probe(struct platform_device *pdev)
for (i = 0; i < nregulators; i++) {
rk808_rdev = devm_regulator_register(&pdev->dev,
&regulators[i], &config);
if (IS_ERR(rk808_rdev)) {
dev_err(&pdev->dev,
"failed to register %d regulator\n", i);
return PTR_ERR(rk808_rdev);
}
if (IS_ERR(rk808_rdev))
return dev_err_probe(&pdev->dev, PTR_ERR(rk808_rdev),
"failed to register %d regulator\n", i);
}
return 0;
......
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