From: Bjorn Andersson Date: Tue, 29 Mar 2016 03:36:58 +0000 (-0700) Subject: remoteproc: core: Make the loaded resource table optional X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e395f9ce49eb5a9fa69c3fd74b6de59a5cb5a300;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git remoteproc: core: Make the loaded resource table optional 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 Signed-off-by: Bjorn Andersson --- diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c index 1210d6db40b1..31dfc9996389 100644 --- a/drivers/remoteproc/remoteproc_core.c +++ b/drivers/remoteproc/remoteproc_core.c @@ -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);