From: Yoshihiro Shimoda Date: Mon, 19 Aug 2019 06:20:12 +0000 (+0900) Subject: pwm: rcar: Remove a redundant condition in rcar_pwm_apply() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=c79468b8955b4924b5aca858247395265201ac42;p=linux.git pwm: rcar: Remove a redundant condition in rcar_pwm_apply() Since the rcar_pwm_apply() has already checked whether state->enabled is set or not, this patch removes a redundant condition. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Geert Uytterhoeven Reviewed-by: Uwe Kleine-König Reviewed-by: Simon Horman Signed-off-by: Thierry Reding --- diff --git a/drivers/pwm/pwm-rcar.c b/drivers/pwm/pwm-rcar.c index 5b2b8ecc354c4..c8cd43f91efcd 100644 --- a/drivers/pwm/pwm-rcar.c +++ b/drivers/pwm/pwm-rcar.c @@ -187,7 +187,7 @@ static int rcar_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm, /* The SYNC should be set to 0 even if rcar_pwm_set_counter failed */ rcar_pwm_update(rp, RCAR_PWMCR_SYNC, 0, RCAR_PWMCR); - if (!ret && state->enabled) + if (!ret) ret = rcar_pwm_enable(rp); return ret;