projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0555d41
)
regulator: fixed: use dev_err_probe for register
author
Chris Morgan
<macromorgan@hotmail.com>
Wed, 21 Jul 2021 16:57:16 +0000
(11:57 -0500)
committer
Mark Brown
<broonie@kernel.org>
Thu, 22 Jul 2021 11:40:12 +0000
(12:40 +0100)
Instead of returning error directly, use dev_err_probe. This avoids
messages in the dmesg log for devices which will be probed again later.
Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
Link:
https://lore.kernel.org/r/20210721165716.19915-1-macroalpha82@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/fixed.c
patch
|
blob
|
history
diff --git
a/drivers/regulator/fixed.c
b/drivers/regulator/fixed.c
index
3928461
..
599ad20
100644
(file)
--- a/
drivers/regulator/fixed.c
+++ b/
drivers/regulator/fixed.c
@@
-287,8
+287,9
@@
static int reg_fixed_voltage_probe(struct platform_device *pdev)
drvdata->dev = devm_regulator_register(&pdev->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);
+ ret = dev_err_probe(&pdev->dev, PTR_ERR(drvdata->dev),
+ "Failed to register regulator: %ld\n",
+ PTR_ERR(drvdata->dev));
return ret;
}