From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <> From: Yoshihiro Shimoda Subject: [PATCH RFC 5/7] pwm: rcar: remove a redundant condition in rcar_pwm_apply() Date: Mon, 8 Jul 2019 18:07:46 +0900 Message-Id: <1562576868-8124-6-git-send-email-yoshihiro.shimoda.uh@renesas.com> In-Reply-To: <1562576868-8124-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> References: <1562576868-8124-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> To: linus.walleij@linaro.org, geert+renesas@glider.be, thierry.reding@gmail.com, robh+dt@kernel.org, mark.rutland@arm.com Cc: linux-gpio@vger.kernel.org, linux-pwm@vger.kernel.org, devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Yoshihiro Shimoda List-ID: Since the rcar_pwm_apply() has already check whehter state->enabled is not set or not, this patch removes a redundant condition. Signed-off-by: Yoshihiro Shimoda --- drivers/pwm/pwm-rcar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pwm/pwm-rcar.c b/drivers/pwm/pwm-rcar.c index 5b2b8ec..c8cd43f 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; -- 2.7.4