summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSjur Brændeland <sjur.brandeland@stericsson.com>2012-06-10 14:37:51 +0300
committerXavier Boudet <x-boudet@ti.com>2012-07-19 18:24:28 +0200
commit07c1ac71063349d2256261c27e68b59fa1f97adf (patch)
treeff46aed70c28b7fff03a0f0d92e66c22d9b34a74
parentdffc2c8208d615e0c7ee8482d59b67dc1f4544e6 (diff)
remoteproc: fix missing fault indication in error-path
If rproc_find_rsc_table() fails, rproc_fw_boot() must set return-value before jumping to clean_up label. Otherwise no error value is returned. Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com> Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com> Cc: stable@vger.kernel.org
-rw-r--r--drivers/remoteproc/remoteproc_core.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c
index 78e6ce99f54d..9b1b3eb9202d 100644
--- a/drivers/remoteproc/remoteproc_core.c
+++ b/drivers/remoteproc/remoteproc_core.c
@@ -1318,8 +1318,10 @@ static int rproc_fw_boot(struct rproc *rproc, const struct firmware *fw)
/* look for the resource table */
table = rproc_find_rsc_table(rproc, fw->data, fw->size, &tablesz);
- if (!table)
+ if (!table) {
+ ret = -EINVAL;
goto clean_up;
+ }
/* handle fw resources which are required to boot rproc */
ret = rproc_handle_boot_rsc(rproc, table, tablesz);