mirror of
https://github.com/torvalds/linux.git
synced 2026-05-28 00:53:34 +02:00
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: 67a7bc7f03 ("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>
This commit is contained in:
parent
390045a245
commit
665eebebb0
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user