[PATCH 07/10] video: backlight-pwm: Add error message

Sascha Hauer s.hauer at pengutronix.de
Wed Sep 23 04:47:28 PDT 2015


Inform the user when we can't find a pwm for the backlight driver.

Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 drivers/video/backlight-pwm.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/video/backlight-pwm.c b/drivers/video/backlight-pwm.c
index 91b1481..8f17f21 100644
--- a/drivers/video/backlight-pwm.c
+++ b/drivers/video/backlight-pwm.c
@@ -160,8 +160,10 @@ static int backlight_pwm_of_probe(struct device_d *dev)
 	struct pwm_device *pwm;
 
 	pwm = of_pwm_request(dev->device_node, NULL);
-	if (IS_ERR(pwm))
+	if (IS_ERR(pwm)) {
+		dev_err(dev, "Cannot find PWM device\n");
 		return PTR_ERR(pwm);
+	}
 
 	pwm_backlight = xzalloc(sizeof(*pwm_backlight));
 	pwm_backlight->pwm = pwm;
-- 
2.5.1




More information about the barebox mailing list