浏览代码

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>
Ryo Kodama 9 年之前
父节点
当前提交
fe5aa34d6e
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/pwm/sysfs.c

+ 1 - 1
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);