linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] pwm: ab8500: Add error message if pwmchip_add() fails
@ 2020-08-12  7:52 Uwe Kleine-König
  2020-08-12  8:11 ` Lee Jones
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Uwe Kleine-König @ 2020-08-12  7:52 UTC (permalink / raw)
  To: Thierry Reding, Lee Jones; +Cc: linux-pwm, Linus Walleij, linux-arm-kernel

pwmchip_add() doesn't emit an error message, so add one in the driver.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/pwm/pwm-ab8500.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pwm/pwm-ab8500.c b/drivers/pwm/pwm-ab8500.c
index fdf3964db4a6..4b6f9e24e11d 100644
--- a/drivers/pwm/pwm-ab8500.c
+++ b/drivers/pwm/pwm-ab8500.c
@@ -106,7 +106,7 @@ static int ab8500_pwm_probe(struct platform_device *pdev)
 
 	err = pwmchip_add(&ab8500->chip);
 	if (err < 0)
-		return err;
+		return dev_err_probe(&pdev->dev, err, "Failed to add pwm chip\n");
 
 	dev_dbg(&pdev->dev, "pwm probe successful\n");
 	platform_set_drvdata(pdev, ab8500);
-- 
2.27.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2020-11-11 18:08 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-12  7:52 [PATCH] pwm: ab8500: Add error message if pwmchip_add() fails Uwe Kleine-König
2020-08-12  8:11 ` Lee Jones
2020-10-22 19:22   ` Uwe Kleine-König
2020-10-26  9:33     ` Lee Jones
2020-11-03  8:00       ` Uwe Kleine-König
2020-11-03  8:18         ` Lee Jones
2020-11-06 13:55 ` Linus Walleij
2020-11-11 18:07 ` Thierry Reding

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).