From: Axel Lin Date: Sun, 31 Mar 2013 15:07:30 +0000 (+0800) Subject: pwm: twl: Return proper error if twl6030_pwm_enable() fails X-Git-Tag: firefly_0821_release~3680^2~561^2~9 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=c8e4df3109646762f21c6e288187ec395fdf67be;p=firefly-linux-kernel-4.4.55.git 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 --- 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)