* [PATCH] regulator: fixed: use dev_err_probe for register
@ 2021-07-21 16:57 Chris Morgan
2021-07-22 17:09 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Chris Morgan @ 2021-07-21 16:57 UTC (permalink / raw)
To: linux-kernel; +Cc: broonie, lgirdwood, Chris Morgan
From: Chris Morgan <macromorgan@hotmail.com>
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>
---
drivers/regulator/fixed.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/regulator/fixed.c b/drivers/regulator/fixed.c
index 39284610a536..599ad201dca7 100644
--- 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;
}
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] regulator: fixed: use dev_err_probe for register
2021-07-21 16:57 [PATCH] regulator: fixed: use dev_err_probe for register Chris Morgan
@ 2021-07-22 17:09 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2021-07-22 17:09 UTC (permalink / raw)
To: Chris Morgan, linux-kernel; +Cc: Mark Brown, lgirdwood, Chris Morgan
On Wed, 21 Jul 2021 11:57:16 -0500, Chris Morgan wrote:
> Instead of returning error directly, use dev_err_probe. This avoids
> messages in the dmesg log for devices which will be probed again later.
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next
Thanks!
[1/1] regulator: fixed: use dev_err_probe for register
commit: d0f95e6496a974a890df5eda65ffaee66ab0dc73
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-07-22 17:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-21 16:57 [PATCH] regulator: fixed: use dev_err_probe for register Chris Morgan
2021-07-22 17:09 ` Mark Brown
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.