summaryrefslogtreecommitdiffstats
path: root/drivers/regulator
diff options
context:
space:
mode:
authorSebastian Reichel <sebastian.reichel@collabora.com>2022-10-20 22:42:49 +0200
committerMark Brown <broonie@kernel.org>2022-11-28 13:04:41 +0000
commitf39f8709c217d82aabbf51d8669731137ce09aea (patch)
tree9c49a6431436fc399716eb2c73c5753cf1f1bb43 /drivers/regulator
parent647e57351f8ebc37d8e12cbc0f4bf7471754a0cc (diff)
downloadlinux-f39f8709c217d82aabbf51d8669731137ce09aea.tar.bz2
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: Sebastian Reichel <sebastian.reichel@collabora.com> Link: https://lore.kernel.org/r/20221020204251.108565-12-sebastian.reichel@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/regulator')
-rw-r--r--drivers/regulator/rk808-regulator.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/regulator/rk808-regulator.c b/drivers/regulator/rk808-regulator.c
index ce9c64cadeba..fa9fc1aa1ae3 100644
--- a/drivers/regulator/rk808-regulator.c
+++ b/drivers/regulator/rk808-regulator.c
@@ -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;