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 <[email protected]>
Acked-by: Fabrice Gasnier <[email protected]>
Signed-off-by: Thierry Reding <[email protected]>
This commit is contained in:
Axel Lin 2017-11-07 11:30:41 +08:00 • committed by Thierry Reding
commit f83e2ae260

View 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);
}