From c8e4df3109646762f21c6e288187ec395fdf67be Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Sun, 31 Mar 2013 23:07:30 +0800 Subject: [PATCH] pwm: twl: Return proper error if twl6030_pwm_enable() fails Return proper error instead of 0 if twl6030_pwm_enable() fails. Signed-off-by: Axel Lin Acked-by: Peter Ujfalusi Signed-off-by: Thierry Reding --- drivers/pwm/pwm-twl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pwm/pwm-twl.c b/drivers/pwm/pwm-twl.c index ee7fa5ddba5d..2782001ba183 100644 --- a/drivers/pwm/pwm-twl.c +++ b/drivers/pwm/pwm-twl.c @@ -248,7 +248,7 @@ static int twl6030_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm) twl->twl6030_toggle3 = val; out: mutex_unlock(&twl->mutex); - return 0; + return ret; } static void twl6030_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm) -- 2.20.1