summaryrefslogtreecommitdiffstats
path: root/drivers/pwm/pwm-stm32-lp.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2017-11-07 11:30:41 +0800
committerThierry Reding <thierry.reding@gmail.com>2017-11-15 11:02:06 +0100
commitf83e2ae2606b3754a5b9dfe9dd792c453698df6c (patch)
tree6ee4a8547a171a6ed1556f9b5057b38a59df0bd1 /drivers/pwm/pwm-stm32-lp.c
parent424268c7494c2ae24c95565b9047bbf30309e88a (diff)
downloadlinux-f83e2ae2606b3754a5b9dfe9dd792c453698df6c.tar.gz
linux-f83e2ae2606b3754a5b9dfe9dd792c453698df6c.tar.bz2
linux-f83e2ae2606b3754a5b9dfe9dd792c453698df6c.zip
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 <axel.lin@ingics.com> Acked-by: Fabrice Gasnier <fabrice.gasnier@st.com> Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Diffstat (limited to 'drivers/pwm/pwm-stm32-lp.c')
-rw-r--r--drivers/pwm/pwm-stm32-lp.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/pwm/pwm-stm32-lp.c b/drivers/pwm/pwm-stm32-lp.c
index 9793b296108f..1ac9e4384142 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);
}