summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2013-06-03 18:07:38 +0100
committerMark Brown <broonie@linaro.org>2013-06-03 18:07:38 +0100
commit998a4f2f1caf3106dfa8ce7abd8e87c118ea4fc9 (patch)
tree8a363f929cbc056e5578942c231fc61406e0e167
parent59e618a6ceb79b81b2ed90fcb885f5f3fe2eec59 (diff)
parent68e850d80df934b9c9c15d8a0956512cb3b6f1fc (diff)
Merge remote-tracking branch 'regmap/fix/debugfs' into regmap-linus
-rw-r--r--drivers/base/regmap/regmap-debugfs.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/base/regmap/regmap-debugfs.c b/drivers/base/regmap/regmap-debugfs.c
index 23b701f5fd2..975719bc345 100644
--- a/drivers/base/regmap/regmap-debugfs.c
+++ b/drivers/base/regmap/regmap-debugfs.c
@@ -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