浏览代码

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>
Axel Lin 7 年之前
父节点
当前提交
f83e2ae260
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      drivers/pwm/pwm-stm32-lp.c

+ 1 - 2
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);
 }