Commit fe5aa34d authored by Ryo Kodama's avatar Ryo Kodama Committed by Thierry Reding

pwm: sysfs: Get return value from pwm_apply_state()

This patch adds to check the return value from pwm_apply_state()
used in enable_store(). The error of enable_store() doesn't work
if the return value doesn't received.
Signed-off-by: default avatarRyo Kodama <ryo.kodama.vz@renesas.com>
Signed-off-by: default avatarYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Fixes: 39100cee ("pwm: Switch to the atomic API")
Signed-off-by: default avatarThierry Reding <thierry.reding@gmail.com>
parent ef2bf499
...@@ -152,7 +152,7 @@ static ssize_t enable_store(struct device *child, ...@@ -152,7 +152,7 @@ static ssize_t enable_store(struct device *child,
goto unlock; goto unlock;
} }
pwm_apply_state(pwm, &state); ret = pwm_apply_state(pwm, &state);
unlock: unlock:
mutex_unlock(&export->lock); mutex_unlock(&export->lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment