]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
remoteproc: fix missing fault indication in error-path
authorSjur Brændeland <sjur.brandeland@stericsson.com>
Sun, 10 Jun 2012 11:37:51 +0000 (14:37 +0300)
committerOhad Ben-Cohen <ohad@wizery.com>
Sun, 10 Jun 2012 11:49:46 +0000 (14:49 +0300)
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
drivers/remoteproc/remoteproc_core.c

index cb13f1b74416666819af77a66fd5da26360b6f53..66324ee4678f45984348519813119dc41d71ade9 100644 (file)
@@ -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);