From: Axel Lin Date: Tue, 7 Nov 2017 03:30:41 +0000 (+0800) Subject: pwm: stm32-lp: Remove pwm_is_enabled() check before calling pwm_disable() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=f83e2ae2606b3754a5b9dfe9dd792c453698df6c;p=linux.git pwm: stm32-lp: Remove pwm_is_enabled() check before calling pwm_disable() The same checking is done by the implementation of pwm_disable(). Signed-off-by: Axel Lin Acked-by: Fabrice Gasnier Signed-off-by: Thierry Reding --- diff --git a/drivers/pwm/pwm-stm32-lp.c b/drivers/pwm/pwm-stm32-lp.c index 9793b296108ff..1ac9e43841429 100644 --- a/drivers/pwm/pwm-stm32-lp.c +++ b/drivers/pwm/pwm-stm32-lp.c @@ -219,8 +219,7 @@ static int stm32_pwm_lp_remove(struct platform_device *pdev) unsigned int i; for (i = 0; i < priv->chip.npwm; i++) - if (pwm_is_enabled(&priv->chip.pwms[i])) - pwm_disable(&priv->chip.pwms[i]); + pwm_disable(&priv->chip.pwms[i]); return pwmchip_remove(&priv->chip); }