pwm: rcar: Remove a redundant condition in rcar_pwm_apply()
authorYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Mon, 19 Aug 2019 06:20:12 +0000 (15:20 +0900)
committerThierry Reding <thierry.reding@gmail.com>
Fri, 20 Sep 2019 23:21:58 +0000 (01:21 +0200)
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 <yoshihiro.shimoda.uh@renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
drivers/pwm/pwm-rcar.c

index 5b2b8ec..c8cd43f 100644 (file)
@@ -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;