浏览代码

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

If 'count' value is invalid, return -EINVAL.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
[bjorn: changed commit message]
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Lee Jones 9 年之前
父节点
当前提交
47fff9fd8a
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/remoteproc/remoteproc_debugfs.c

+ 1 - 1
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)