diff options
author | Alex Elder <elder@linaro.org> | 2020-02-28 12:33:59 -0600 |
---|---|---|
committer | Bjorn Andersson <bjorn.andersson@linaro.org> | 2020-03-25 22:29:44 -0700 |
commit | 1f2f65c41034accf9baf684c0dae756b56fac19f (patch) | |
tree | a0ca7d43daf580e38078089d02aac116042f9790 /drivers/remoteproc | |
parent | e138cce3e3736ef0a2772fb963f01c1bafb29c71 (diff) | |
download | linux-1f2f65c41034accf9baf684c0dae756b56fac19f.tar.gz linux-1f2f65c41034accf9baf684c0dae756b56fac19f.tar.bz2 linux-1f2f65c41034accf9baf684c0dae756b56fac19f.zip |
remoteproc: return error for bad "recovery" debugfs input
If the value written to the "recovery" debugfs file is not one of
the recognized commands return an error to indicate it's invalid.
Signed-off-by: Alex Elder <elder@linaro.org>
Link: https://lore.kernel.org/r/20200228183359.16229-5-elder@linaro.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Diffstat (limited to 'drivers/remoteproc')
-rw-r--r-- | drivers/remoteproc/remoteproc_debugfs.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/remoteproc/remoteproc_debugfs.c b/drivers/remoteproc/remoteproc_debugfs.c index b87565a13eb1..d734cadb16e3 100644 --- a/drivers/remoteproc/remoteproc_debugfs.c +++ b/drivers/remoteproc/remoteproc_debugfs.c @@ -146,6 +146,8 @@ rproc_recovery_write(struct file *filp, const char __user *user_buf, } else if (!strncmp(buf, "recover", count)) { /* begin the recovery process without changing the flag */ rproc_trigger_recovery(rproc); + } else { + return -EINVAL; } return count; |