linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] regulator: fixed: use dev_err_probe for gpio
@ 2021-06-16 12:53 Rouven Czerwinski
  2021-06-16 16:41 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Rouven Czerwinski @ 2021-06-16 12:53 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown; +Cc: kernel, Rouven Czerwinski, linux-kernel

Instead of returning the the PTR_ERR directly, use dev_err_probe which
will also correctly set the deferred probe reason in
/sys/kernel/debug/deferred_devices, making it easier to debug missing
devices on the system.

Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
---
 drivers/regulator/fixed.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/regulator/fixed.c b/drivers/regulator/fixed.c
index 02ad83153e19..78f3a938b39b 100644
--- a/drivers/regulator/fixed.c
+++ b/drivers/regulator/fixed.c
@@ -271,7 +271,8 @@ static int reg_fixed_voltage_probe(struct platform_device *pdev)
 	 */
 	cfg.ena_gpiod = gpiod_get_optional(&pdev->dev, NULL, gflags);
 	if (IS_ERR(cfg.ena_gpiod))
-		return PTR_ERR(cfg.ena_gpiod);
+		return dev_err_probe(&pdev->dev, PTR_ERR(cfg.ena_gpiod),
+				     "can't get GPIO\n");
 
 	cfg.dev = &pdev->dev;
 	cfg.init_data = config->init_data;
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] regulator: fixed: use dev_err_probe for gpio
  2021-06-16 12:53 [PATCH] regulator: fixed: use dev_err_probe for gpio Rouven Czerwinski
@ 2021-06-16 16:41 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2021-06-16 16:41 UTC (permalink / raw)
  To: Rouven Czerwinski, Liam Girdwood; +Cc: Mark Brown, linux-kernel, kernel

On Wed, 16 Jun 2021 14:53:31 +0200, Rouven Czerwinski wrote:
> Instead of returning the the PTR_ERR directly, use dev_err_probe which
> will also correctly set the deferred probe reason in
> /sys/kernel/debug/deferred_devices, making it easier to debug missing
> devices on the system.

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 gpio
      commit: 7740ab84c13e32002742106afd443a4ca7fe3918

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-06-16 16:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-16 12:53 [PATCH] regulator: fixed: use dev_err_probe for gpio Rouven Czerwinski
2021-06-16 16:41 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).