mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-04 01:49:36 +00:00
Merge remote-tracking branch 'regmap/fix/debugfs' into regmap-linus
This commit is contained in:
commit
998a4f2f1c
1 changed files with 4 additions and 1 deletions
|
@ -265,6 +265,7 @@ static ssize_t regmap_map_write_file(struct file *file,
|
|||
char *start = buf;
|
||||
unsigned long reg, value;
|
||||
struct regmap *map = file->private_data;
|
||||
int ret;
|
||||
|
||||
buf_size = min(count, (sizeof(buf)-1));
|
||||
if (copy_from_user(buf, user_buf, buf_size))
|
||||
|
@ -282,7 +283,9 @@ static ssize_t regmap_map_write_file(struct file *file,
|
|||
/* Userspace has been fiddling around behind the kernel's back */
|
||||
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;
|
||||
}
|
||||
#else
|
||||
|
|
Loading…
Reference in a new issue