remoteproc: debugfs: Return error on invalid 'count' value
authorLee Jones <lee.jones@linaro.org>
Tue, 12 Jan 2016 12:46:15 +0000 (12:46 +0000)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Sat, 30 Jan 2016 01:26:47 +0000 (17:26 -0800)
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>
drivers/remoteproc/remoteproc_debugfs.c

index 916af5096f57b93b7f7e148d28716329b31c7be6..6fdfa688281a802cd1542290adf4557e4816b33e 100644 (file)
@@ -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)
This page took 0.025779 seconds and 5 git commands to generate.