Skip to content

Commit

Permalink
remoteproc: fix missing fault indication in error-path
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Sjur Brændeland authored and Ohad Ben-Cohen committed Jun 10, 2012
1 parent e981f6d commit 30338cf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/remoteproc/remoteproc_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1041,8 +1041,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);
Expand Down

0 comments on commit 30338cf

Please sign in to comment.