提交 998a4f2f 编写于 作者: M Mark Brown

Merge remote-tracking branch 'regmap/fix/debugfs' into regmap-linus

...@@ -265,6 +265,7 @@ static ssize_t regmap_map_write_file(struct file *file, ...@@ -265,6 +265,7 @@ static ssize_t regmap_map_write_file(struct file *file,
char *start = buf; char *start = buf;
unsigned long reg, value; unsigned long reg, value;
struct regmap *map = file->private_data; struct regmap *map = file->private_data;
int ret;
buf_size = min(count, (sizeof(buf)-1)); buf_size = min(count, (sizeof(buf)-1));
if (copy_from_user(buf, user_buf, buf_size)) if (copy_from_user(buf, user_buf, buf_size))
...@@ -282,7 +283,9 @@ static ssize_t regmap_map_write_file(struct file *file, ...@@ -282,7 +283,9 @@ static ssize_t regmap_map_write_file(struct file *file,
/* Userspace has been fiddling around behind the kernel's back */ /* Userspace has been fiddling around behind the kernel's back */
add_taint(TAINT_USER, LOCKDEP_NOW_UNRELIABLE); add_taint(TAINT_USER, LOCKDEP_NOW_UNRELIABLE);
regmap_write(map, reg, value); ret = regmap_write(map, reg, value);
if (ret < 0)
return ret;
return buf_size; return buf_size;
} }
#else #else
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册