Commit 1f2f65c4 authored by Alex Elder's avatar Alex Elder Committed by Bjorn Andersson

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: default avatarAlex Elder <elder@linaro.org>
Link: https://lore.kernel.org/r/20200228183359.16229-5-elder@linaro.orgSigned-off-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
parent e138cce3
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment