diff options
author | Lee Jones <lee.jones@linaro.org> | 2016-01-12 07:46:15 -0500 |
---|---|---|
committer | Bjorn Andersson <bjorn.andersson@linaro.org> | 2016-01-29 20:26:47 -0500 |
commit | 47fff9fd8a7848c44c83b34ad7825d2185b9b319 (patch) | |
tree | 20b30514f774c9e575ad00827a161fac735994c4 /drivers/remoteproc | |
parent | 99c429cb4e628e8b6b8131910952436ad10b21f5 (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.c | 2 |
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, | |||
157 | int ret; | 157 | int ret; |
158 | 158 | ||
159 | if (count < 1 || count > sizeof(buf)) | 159 | if (count < 1 || count > sizeof(buf)) |
160 | return count; | 160 | return -EINVAL; |
161 | 161 | ||
162 | ret = copy_from_user(buf, user_buf, count); | 162 | ret = copy_from_user(buf, user_buf, count); |
163 | if (ret) | 163 | if (ret) |