From 47fff9fd8a7848c44c83b34ad7825d2185b9b319 Mon Sep 17 00:00:00 2001 From: Lee Jones Date: Tue, 12 Jan 2016 12:46:15 +0000 Subject: remoteproc: debugfs: Return error on invalid 'count' value If 'count' value is invalid, return -EINVAL. Signed-off-by: Lee Jones [bjorn: changed commit message] Signed-off-by: Bjorn Andersson --- drivers/remoteproc/remoteproc_debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/remoteproc') 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) -- cgit v1.2.3