diff options
| author | Dan Carpenter <dan.carpenter@linaro.org> | 2025-11-29 17:50:53 +0300 |
|---|---|---|
| committer | Bjorn Andersson <andersson@kernel.org> | 2025-11-29 14:18:23 -0600 |
| commit | 5e6fee736ee0d85acd74f955cab0110b15de4d11 (patch) | |
| tree | b03d7c35acdb36fac58b75a2b149122eb849b1d2 | |
| parent | 099a60cca1b84e60fdaefcd5d93736de9dba9cf9 (diff) | |
remoteproc: qcom_q6v5_adsp: Fix a NULL vs IS_ERR() check in adsp_alloc_memory_region()
The devm_ioremap_resource_wc() function never returns NULL, it returns
error pointers. Update the check to match.
Fixes: c70b9d5fdcd7 ("remoteproc: qcom: Use of_reserved_mem_region_* functions for "memory-region"")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/6d6b1b0fb6a61b5155a640507217fd7e658858cf.1764427595.git.dan.carpenter@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
| -rw-r--r-- | drivers/remoteproc/qcom_q6v5_adsp.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/remoteproc/qcom_q6v5_adsp.c b/drivers/remoteproc/qcom_q6v5_adsp.c index d3933a66ed3d..b5c8d6d38c9c 100644 --- a/drivers/remoteproc/qcom_q6v5_adsp.c +++ b/drivers/remoteproc/qcom_q6v5_adsp.c @@ -637,9 +637,10 @@ static int adsp_alloc_memory_region(struct qcom_adsp *adsp) adsp->mem_phys = adsp->mem_reloc = res.start; adsp->mem_size = resource_size(&res); adsp->mem_region = devm_ioremap_resource_wc(adsp->dev, &res); - if (!adsp->mem_region) { + if (IS_ERR(adsp->mem_region)) { dev_err(adsp->dev, "unable to map memory region: %pR\n", &res); - return -EBUSY; + return PTR_ERR(adsp->mem_region); + } return 0; |
