remoteproc: core: Make the loaded resource table optional
authorBjorn Andersson <bjorn.andersson@sonymobile.com>
Tue, 29 Mar 2016 03:36:58 +0000 (20:36 -0700)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Thu, 12 May 2016 22:50:04 +0000 (15:50 -0700)
Remote processors like the ones found in the Qualcomm SoCs does not have
a resource table passed to them, so make it optional by only populating
it if it does exist.

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
drivers/remoteproc/remoteproc_core.c

index 1210d6db40b1c2036537ea539d0230c2c606318b..31dfc999638971e08d08e9ad20ac452f4756fa26 100644 (file)
@@ -856,12 +856,8 @@ 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) {
-               ret = -EINVAL;
-               goto clean_up;
-       }
-
-       memcpy(loaded_table, rproc->cached_table, tablesz);
+       if (loaded_table)
+               memcpy(loaded_table, rproc->cached_table, tablesz);
 
        /* power up the remote processor */
        ret = rproc->ops->start(rproc);