diff options
-rw-r--r-- | drivers/remoteproc/remoteproc_core.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c index 022dc635d01e..7e33536b5c2b 100644 --- a/drivers/remoteproc/remoteproc_core.c +++ b/drivers/remoteproc/remoteproc_core.c | |||
@@ -815,18 +815,17 @@ static int rproc_fw_boot(struct rproc *rproc, const struct firmware *fw) | |||
815 | } | 815 | } |
816 | 816 | ||
817 | rproc->bootaddr = rproc_get_boot_addr(rproc, fw); | 817 | rproc->bootaddr = rproc_get_boot_addr(rproc, fw); |
818 | ret = -EINVAL; | ||
818 | 819 | ||
819 | /* look for the resource table */ | 820 | /* look for the resource table */ |
820 | table = rproc_find_rsc_table(rproc, fw, &tablesz); | 821 | table = rproc_find_rsc_table(rproc, fw, &tablesz); |
821 | if (!table) { | 822 | if (!table) { |
822 | ret = -EINVAL; | ||
823 | goto clean_up; | 823 | goto clean_up; |
824 | } | 824 | } |
825 | 825 | ||
826 | /* Verify that resource table in loaded fw is unchanged */ | 826 | /* Verify that resource table in loaded fw is unchanged */ |
827 | if (rproc->table_csum != crc32(0, table, tablesz)) { | 827 | if (rproc->table_csum != crc32(0, table, tablesz)) { |
828 | dev_err(dev, "resource checksum failed, fw changed?\n"); | 828 | dev_err(dev, "resource checksum failed, fw changed?\n"); |
829 | ret = -EINVAL; | ||
830 | goto clean_up; | 829 | goto clean_up; |
831 | } | 830 | } |
832 | 831 | ||
@@ -852,8 +851,10 @@ static int rproc_fw_boot(struct rproc *rproc, const struct firmware *fw) | |||
852 | * copy this information to device memory. | 851 | * copy this information to device memory. |
853 | */ | 852 | */ |
854 | loaded_table = rproc_find_loaded_rsc_table(rproc, fw); | 853 | loaded_table = rproc_find_loaded_rsc_table(rproc, fw); |
855 | if (!loaded_table) | 854 | if (!loaded_table) { |
855 | ret = -EINVAL; | ||
856 | goto clean_up; | 856 | goto clean_up; |
857 | } | ||
857 | 858 | ||
858 | memcpy(loaded_table, rproc->cached_table, tablesz); | 859 | memcpy(loaded_table, rproc->cached_table, tablesz); |
859 | 860 | ||