From: Wei Yongjun <yongjun_...@trendmicro.com.cn> Fix to return -EINVAL in the rproc_find_loaded_rsc_table() error handling case instead of 0, as done elsewhere in this function.
Introduced by commit a2b950ac7b1e6442919ee9e79c4963e134698869 (remoteproc: perserve resource table data). Signed-off-by: Wei Yongjun <yongjun_...@trendmicro.com.cn> --- drivers/remoteproc/remoteproc_core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c index 022dc63..56e35c6 100644 --- a/drivers/remoteproc/remoteproc_core.c +++ b/drivers/remoteproc/remoteproc_core.c @@ -852,8 +852,10 @@ static int rproc_fw_boot(struct rproc *rproc, const struct firmware *fw) * copy this information to device memory. */ loaded_table = rproc_find_loaded_rsc_table(rproc, fw); - if (!loaded_table) + if (!loaded_table) { + ret = -EINVAL; goto clean_up; + } memcpy(loaded_table, rproc->cached_table, tablesz); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/