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>
This commit is contained in:
Alex Elder 2020-02-28 12:33:59 -06:00 committed by Bjorn Andersson
parent e138cce3e3
commit 1f2f65c410
1 changed files with 2 additions and 0 deletions

View File

@ -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;