From: Lee Jones Date: Tue, 12 Jan 2016 12:46:15 +0000 (+0000) Subject: remoteproc: debugfs: Return error on invalid 'count' value X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=47fff9fd8a7848c44c83b34ad7825d2185b9b319;p=deliverable%2Flinux.git 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 --- 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)