mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
remoteproc: debugfs: Return error on invalid 'count' value
If 'count' value is invalid, return -EINVAL. Signed-off-by: Lee Jones <[email protected]> [bjorn: changed commit message] Signed-off-by: Bjorn Andersson <[email protected]>
This commit is contained in:
parent
99c429cb4e
commit
47fff9fd8a
1 changed files with 1 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue