projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e138cce
)
remoteproc: return error for bad "recovery" debugfs input
author
Alex Elder
<elder@linaro.org>
Fri, 28 Feb 2020 18:33:59 +0000
(12:33 -0600)
committer
Bjorn Andersson
<bjorn.andersson@linaro.org>
Thu, 26 Mar 2020 05:29:44 +0000
(22:29 -0700)
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>
drivers/remoteproc/remoteproc_debugfs.c
patch
|
blob
|
history
diff --git
a/drivers/remoteproc/remoteproc_debugfs.c
b/drivers/remoteproc/remoteproc_debugfs.c
index b87565a13eb1e18cbe7e4f383a7186e829f48090..d734cadb16e3ee17a9a1ec172cd35be4b053e813 100644
(file)
--- 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;