diff options
author | Ben Dooks <ben-linux@fluff.org> | 2008-07-01 09:18:27 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-07-03 08:25:07 -0400 |
commit | 43bda1a6d218744382547a2f8be3240d1c3a151b (patch) | |
tree | 7a765e743a6e2cfde5db08dfe073a412e42df873 /drivers/video | |
parent | 3b73125af69f93972625f4b655675f42ca4274eb (diff) |
[ARM] 5141/1: PWM: pwm_request() should return an PTR_ERR() instead of NULL.
Make the return of pwm_request() be more informative than just
being NULL on error by using PTR_ERR() to respond with an
approriate error.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/backlight/pwm_bl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c index 8346dfc01cf6..6338d0e2fe07 100644 --- a/drivers/video/backlight/pwm_bl.c +++ b/drivers/video/backlight/pwm_bl.c | |||
@@ -87,9 +87,9 @@ static int pwm_backlight_probe(struct platform_device *pdev) | |||
87 | pb->notify = data->notify; | 87 | pb->notify = data->notify; |
88 | 88 | ||
89 | pb->pwm = pwm_request(data->pwm_id, "backlight"); | 89 | pb->pwm = pwm_request(data->pwm_id, "backlight"); |
90 | if (pb->pwm == NULL) { | 90 | if (IS_ERR(pb->pwm)) { |
91 | dev_err(&pdev->dev, "unable to request PWM for backlight\n"); | 91 | dev_err(&pdev->dev, "unable to request PWM for backlight\n"); |
92 | ret = -EBUSY; | 92 | ret = PTR_ERR(pb->pwm); |
93 | goto err_pwm; | 93 | goto err_pwm; |
94 | } | 94 | } |
95 | 95 | ||