summaryrefslogtreecommitdiffstats
path: root/drivers/remoteproc/remoteproc_debugfs.c
diff options
context:
space:
mode:
authorLee Jones <lee.jones@linaro.org>2016-01-12 13:46:15 +0100
committerBjorn Andersson <bjorn.andersson@linaro.org>2016-01-30 02:26:47 +0100
commit47fff9fd8a7848c44c83b34ad7825d2185b9b319 (patch)
tree20b30514f774c9e575ad00827a161fac735994c4 /drivers/remoteproc/remoteproc_debugfs.c
parentremoteproc/wkup_m3: Use MODULE_DEVICE_TABLE to export alias (diff)
downloadlinux-47fff9fd8a7848c44c83b34ad7825d2185b9b319.tar.xz
linux-47fff9fd8a7848c44c83b34ad7825d2185b9b319.zip
remoteproc: debugfs: Return error on invalid 'count' value
If 'count' value is invalid, return -EINVAL. Signed-off-by: Lee Jones <lee.jones@linaro.org> [bjorn: changed commit message] Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Diffstat (limited to 'drivers/remoteproc/remoteproc_debugfs.c')
-rw-r--r--drivers/remoteproc/remoteproc_debugfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/remoteproc/remoteproc_debugfs.c b/drivers/remoteproc/remoteproc_debugfs.c
index 916af5096f57..6fdfa688281a 100644
--- a/drivers/remoteproc/remoteproc_debugfs.c
+++ b/drivers/remoteproc/remoteproc_debugfs.c
@@ -157,7 +157,7 @@ rproc_recovery_write(struct file *filp, const char __user *user_buf,
int ret;
if (count < 1 || count > sizeof(buf))
- return count;
+ return -EINVAL;
ret = copy_from_user(buf, user_buf, count);
if (ret)