summaryrefslogtreecommitdiff
path: root/drivers/pwm/pwm-cros-ec.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pwm/pwm-cros-ec.c')
-rw-r--r--drivers/pwm/pwm-cros-ec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pwm/pwm-cros-ec.c b/drivers/pwm/pwm-cros-ec.c
index 11684edc0620..86df6702cb83 100644
--- a/drivers/pwm/pwm-cros-ec.c
+++ b/drivers/pwm/pwm-cros-ec.c
@@ -193,7 +193,7 @@ static int cros_ec_pwm_get_state(struct pwm_chip *chip, struct pwm_device *pwm,
ret = cros_ec_pwm_get_duty(ec_pwm, pwm->hwpwm);
if (ret < 0) {
dev_err(chip->dev, "error getting initial duty: %d\n", ret);
- return 0;
+ return ret;
}
state->enabled = (ret > 0);