linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] backlight: pwm_bl: print errno for probe errors
@ 2024-08-01  9:12 Martin Kepplinger-Novaković
  2024-08-01  9:26 ` Uwe Kleine-König
  2024-08-01 12:31 ` Lee Jones
  0 siblings, 2 replies; 6+ messages in thread
From: Martin Kepplinger-Novaković @ 2024-08-01  9:12 UTC (permalink / raw)
  To: ukleinek, lee, daniel.thompson, jingoohan1
  Cc: linux-pwm, dri-devel, linux-fbdev, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1475 bytes --]

This makes debugging often easier.

Signed-off-by: Martin Kepplinger-Novaković <martin.kepplinger-novakovic@ginzinger.com>
---
 drivers/video/backlight/pwm_bl.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c
index f1005bd0c41e3..cc7e7af71891f 100644
--- a/drivers/video/backlight/pwm_bl.c
+++ b/drivers/video/backlight/pwm_bl.c
@@ -502,7 +502,8 @@ static int pwm_backlight_probe(struct platform_device *pdev)
 						  GPIOD_ASIS);
 	if (IS_ERR(pb->enable_gpio)) {
 		ret = dev_err_probe(&pdev->dev, PTR_ERR(pb->enable_gpio),
-				    "failed to acquire enable GPIO\n");
+				    "failed to acquire enable GPIO: %ld\n",
+				    PTR_ERR(pb->enable_gpio));
 		goto err_alloc;
 	}
 
@@ -513,7 +514,8 @@ static int pwm_backlight_probe(struct platform_device *pdev)
 			pb->power_supply = NULL;
 		} else {
 			dev_err_probe(&pdev->dev, ret,
-				      "failed to acquire power regulator\n");
+				      "failed to acquire power regulator: %d\n",
+				      ret);
 			goto err_alloc;
 		}
 	}
@@ -521,7 +523,8 @@ static int pwm_backlight_probe(struct platform_device *pdev)
 	pb->pwm = devm_pwm_get(&pdev->dev, NULL);
 	if (IS_ERR(pb->pwm)) {
 		ret = dev_err_probe(&pdev->dev, PTR_ERR(pb->pwm),
-				    "unable to request PWM\n");
+				    "unable to request PWM: %ld\n",
+				    PTR_ERR(pb->pwm));
 		goto err_alloc;
 	}
 
-- 
2.39.2

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 7522 bytes --]

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

end of thread, other threads:[~2024-08-01 12:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-01  9:12 [PATCH] backlight: pwm_bl: print errno for probe errors Martin Kepplinger-Novaković
2024-08-01  9:26 ` Uwe Kleine-König
2024-08-01  9:52   ` Kepplinger-Novakovic Martin
2024-08-01 10:09     ` Uwe Kleine-König
2024-08-01 10:12       ` Kepplinger-Novakovic Martin
2024-08-01 12:31 ` Lee Jones

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