summaryrefslogtreecommitdiff
path: root/drivers/pwm/sysfs.c
diff options
context:
space:
mode:
authorRyo Kodama <ryo.kodama.vz@renesas.com>2016-06-08 10:58:23 +0900
committerThierry Reding <thierry.reding@gmail.com>2016-06-10 14:24:40 +0200
commitfe5aa34d6eb9c4d34071845f70f3714b41c8a77d (patch)
tree941c6fec129aff1b1436cefab2fe3af76cab2ea0 /drivers/pwm/sysfs.c
parentef2bf4997f7da6efa8540d9cf726c44bf2b863af (diff)
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: Ryo Kodama <ryo.kodama.vz@renesas.com> Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Fixes: 39100ceea79f ("pwm: Switch to the atomic API") Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Diffstat (limited to 'drivers/pwm/sysfs.c')
-rw-r--r--drivers/pwm/sysfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pwm/sysfs.c b/drivers/pwm/sysfs.c
index d98599249a05..01695d48dd54 100644
--- a/drivers/pwm/sysfs.c
+++ b/drivers/pwm/sysfs.c
@@ -152,7 +152,7 @@ static ssize_t enable_store(struct device *child,
goto unlock;
}
- pwm_apply_state(pwm, &state);
+ ret = pwm_apply_state(pwm, &state);
unlock:
mutex_unlock(&export->lock);