From: Wei Yongjun <[email protected]>
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 <[email protected]>
---
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);
On Thu, May 9, 2013 at 5:02 AM, Wei Yongjun <[email protected]> wrote:
> From: Wei Yongjun <[email protected]>
>
> 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 <[email protected]>
Applying while fixing additional instances of this in the same function. Thanks!