Signed-off-by: Roman Beranek <[email protected]>
---
 drivers/pwm/pwm-sun4i.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pwm/pwm-sun4i.c b/drivers/pwm/pwm-sun4i.c
index 6ab06b9749d0..88bd90498d1f 100644
--- a/drivers/pwm/pwm-sun4i.c
+++ b/drivers/pwm/pwm-sun4i.c
@@ -304,7 +304,7 @@ static int sun4i_pwm_apply(struct pwm_chip *chip, struct 
pwm_device *pwm,
 
        sun4i_pwm_writel(sun4i_pwm, ctrl, PWM_CTRL_REG);
 
-       if (state->enabled) {
+       if (state->enabled || !cstate.enabled) {
                mutex_unlock(&sun4i_pwm->ctrl_lock);
                return 0;
        }
-- 
2.31.1

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/linux-sunxi/20210531044608.1006024-7-roman.beranek%40prusa3d.com.

Reply via email to