diff options
author | Ryo Kodama <ryo.kodama.vz@renesas.com> | 2016-06-08 10:58:23 +0900 |
---|---|---|
committer | Huang, Tao <huangtao@rock-chips.com> | 2017-03-06 18:28:40 +0800 |
commit | 9d523c146299c8c32204b1e94c664a3e18b8ad78 (patch) | |
tree | ee3ccd6b8c0d42c329bb27d4834a676d8ed74c1c /drivers/pwm | |
parent | 5e88e30e7eaeda711f0cc819fbfdffbb130e42db (diff) |
UPSTREAM: 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>
(cherry picked from commit fe5aa34d6eb9c4d34071845f70f3714b41c8a77d)
Change-Id: I550da28345bcee7a6aa8e1f9b5c43adae923ff2d
Signed-off-by: David Wu <david.wu@rock-chips.com>
Diffstat (limited to 'drivers/pwm')
-rw-r--r-- | drivers/pwm/sysfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pwm/sysfs.c b/drivers/pwm/sysfs.c index 850ff5fa9e38..2cb39f17a54a 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); |