diff options
| author | Chen Ni <nichen@iscas.ac.cn> | 2026-02-27 12:15:46 +0300 |
|---|---|---|
| committer | Mathieu Poirier <mathieu.poirier@linaro.org> | 2026-03-05 20:22:05 +0300 |
| commit | 665eebebb029690a5b2f92e481020877cc6c8d36 (patch) | |
| tree | a81b97b9e4994bfd2f29d63b50943f4fa714ca37 | |
| parent | 390045a24591ac4071ed6fff80b317f685fbdd6f (diff) | |
| download | linux-665eebebb029690a5b2f92e481020877cc6c8d36.tar.xz | |
remoteproc: imx_rproc: Fix NULL vs IS_ERR() bug in imx_rproc_addr_init()
The devm_ioremap_resource_wc() function never returns NULL, it returns
error pointers. Update the error checking to match.
Fixes: 67a7bc7f0358 ("remoteproc: Use of_reserved_mem_region_* functions for "memory-region"")
Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20260227091546.4044246-1-nichen@iscas.ac.cn
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
| -rw-r--r-- | drivers/remoteproc/imx_rproc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c index 75baf905988b..ef8f7c8fbda8 100644 --- a/drivers/remoteproc/imx_rproc.c +++ b/drivers/remoteproc/imx_rproc.c @@ -812,7 +812,7 @@ static int imx_rproc_addr_init(struct imx_rproc *priv, /* Not use resource version, because we might share region */ priv->mem[b].cpu_addr = devm_ioremap_resource_wc(&pdev->dev, &res); - if (!priv->mem[b].cpu_addr) { + if (IS_ERR(priv->mem[b].cpu_addr)) { dev_err(dev, "failed to remap %pr\n", &res); return -ENOMEM; } |
