Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

backlight: add more information output to pwm_backlight

Make the error paths in the pwm_backlight driver more informative in the
probe path, especially for the times that it finds an error.

Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Cc: Richard Purdie <rpurdie@rpsys.net>
Acked-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Ben Dooks and committed by
Linus Torvalds
14563a4e 26cb8bb2

+6 -2
+6 -2
drivers/video/backlight/pwm_bl.c
··· 68 68 struct pwm_bl_data *pb; 69 69 int ret; 70 70 71 - if (!data) 71 + if (!data) { 72 + dev_err(&pdev->dev, "failed to find platform data\n"); 72 73 return -EINVAL; 74 + } 73 75 74 76 if (data->init) { 75 77 ret = data->init(&pdev->dev); ··· 81 79 82 80 pb = kzalloc(sizeof(*pb), GFP_KERNEL); 83 81 if (!pb) { 82 + dev_err(&pdev->dev, "no memory for state\n"); 84 83 ret = -ENOMEM; 85 84 goto err_alloc; 86 85 } ··· 94 91 dev_err(&pdev->dev, "unable to request PWM for backlight\n"); 95 92 ret = PTR_ERR(pb->pwm); 96 93 goto err_pwm; 97 - } 94 + } else 95 + dev_dbg(&pdev->dev, "got pwm for backlight\n"); 98 96 99 97 bl = backlight_device_register(pdev->name, &pdev->dev, 100 98 pb, &pwm_backlight_ops);