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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
---
 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


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux