Commit 47fff9fd authored by Lee Jones's avatar Lee Jones Committed by Bjorn Andersson

remoteproc: debugfs: Return error on invalid 'count' value

If 'count' value is invalid, return -EINVAL.
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
[bjorn: changed commit message]
Signed-off-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
parent 99c429cb
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment