[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>
Este cometimento está contido em:

cometido por
Russell King

ascendente
3b73125af6
cometimento
43bda1a6d2
@@ -87,9 +87,9 @@ static int pwm_backlight_probe(struct platform_device *pdev)
|
||||
pb->notify = data->notify;
|
||||
|
||||
pb->pwm = pwm_request(data->pwm_id, "backlight");
|
||||
if (pb->pwm == NULL) {
|
||||
if (IS_ERR(pb->pwm)) {
|
||||
dev_err(&pdev->dev, "unable to request PWM for backlight\n");
|
||||
ret = -EBUSY;
|
||||
ret = PTR_ERR(pb->pwm);
|
||||
goto err_pwm;
|
||||
}
|
||||
|
||||
|
Criar uma nova questão referindo esta
Bloquear um utilizador