summaryrefslogtreecommitdiff
path: root/drivers/remoteproc
diff options
context:
space:
mode:
authorLee Jones <lee.jones@linaro.org>2016-01-12 12:46:15 +0000
committerBjorn Andersson <bjorn.andersson@linaro.org>2016-01-29 17:26:47 -0800
commit47fff9fd8a7848c44c83b34ad7825d2185b9b319 (patch)
tree20b30514f774c9e575ad00827a161fac735994c4 /drivers/remoteproc
parent99c429cb4e628e8b6b8131910952436ad10b21f5 (diff)
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')
-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)