pwm: stm32-lp: Remove pwm_is_enabled() check before calling pwm_disable()
authorAxel Lin <axel.lin@ingics.com>
Tue, 7 Nov 2017 03:30:41 +0000 (11:30 +0800)
committerThierry Reding <thierry.reding@gmail.com>
Wed, 15 Nov 2017 10:02:06 +0000 (11:02 +0100)
The same checking is done by the implementation of pwm_disable().

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
drivers/pwm/pwm-stm32-lp.c

index 9793b296108ff1cca722d1bb78f6896b28b777e8..1ac9e438414291a3330edfd5ad5e05370703d4b5 100644 (file)
@@ -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);
 }