summaryrefslogtreecommitdiffstats
path: root/kernel/drivers/remoteproc/remoteproc_debugfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/drivers/remoteproc/remoteproc_debugfs.c')
-rw-r--r--kernel/drivers/remoteproc/remoteproc_debugfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/drivers/remoteproc/remoteproc_debugfs.c b/kernel/drivers/remoteproc/remoteproc_debugfs.c
index 9d30809bb..916af5096 100644
--- a/kernel/drivers/remoteproc/remoteproc_debugfs.c
+++ b/kernel/drivers/remoteproc/remoteproc_debugfs.c
@@ -156,7 +156,7 @@ rproc_recovery_write(struct file *filp, const char __user *user_buf,
char buf[10];
int ret;
- if (count > sizeof(buf))
+ if (count < 1 || count > sizeof(buf))
return count;
ret = copy_from_user(buf, user_buf, count);