Skip to content

Commit cc2fd63

Browse files
Chen Nigregkh
authored andcommitted
remoteproc: imx_rproc: Fix NULL vs IS_ERR() bug in imx_rproc_addr_init()
commit 665eebe upstream. The devm_ioremap_resource_wc() function never returns NULL, it returns error pointers. Update the error checking to match. Fixes: 67a7bc7 ("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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 935ee27 commit cc2fd63

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/remoteproc/imx_rproc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -812,7 +812,7 @@ static int imx_rproc_addr_init(struct imx_rproc *priv,
812812

813813
/* Not use resource version, because we might share region */
814814
priv->mem[b].cpu_addr = devm_ioremap_resource_wc(&pdev->dev, &res);
815-
if (!priv->mem[b].cpu_addr) {
815+
if (IS_ERR(priv->mem[b].cpu_addr)) {
816816
dev_err(dev, "failed to remap %pr\n", &res);
817817
return -ENOMEM;
818818
}

0 commit comments

Comments
 (0)