drivers/soc/fsl/qe/qmc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Fix wrong variable used for error checking after devm_ioremap_resource()
call. The function checks qmc->scc_pram instead of qmc->dpram, which
could lead to incorrect error handling.
Fixes: eb680d563089 ("soc: fsl: cpm1: qmc: Add support for QUICC Engine (QE) implementation")
Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
---
drivers/soc/fsl/qe/qmc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/soc/fsl/qe/qmc.c b/drivers/soc/fsl/qe/qmc.c
index c4587b32a59b..672adff8e35f 100644
--- a/drivers/soc/fsl/qe/qmc.c
+++ b/drivers/soc/fsl/qe/qmc.c
@@ -1790,8 +1790,8 @@ static int qmc_qe_init_resources(struct qmc *qmc, struct platform_device *pdev)
return -EINVAL;
qmc->dpram_offset = res->start - qe_muram_dma(qe_muram_addr(0));
qmc->dpram = devm_ioremap_resource(qmc->dev, res);
- if (IS_ERR(qmc->scc_pram))
- return PTR_ERR(qmc->scc_pram);
+ if (IS_ERR(qmc->dpram))
+ return PTR_ERR(qmc->dpram);
return 0;
}
--
2.25.1
On Mon, 09 Feb 2026 09:59:04 +0800, Chen Ni wrote:
> Fix wrong variable used for error checking after devm_ioremap_resource()
> call. The function checks qmc->scc_pram instead of qmc->dpram, which
> could lead to incorrect error handling.
>
>
Applied, thanks!
[1/1] soc: fsl: cpm1: qmc: Fix error check for devm_ioremap_resource() in qmc_qe_init_resources()
commit: 39676244858f24089f83134bbf975dd31abe7544
Best regards,
--
Christophe Leroy (CS GROUP) <chleroy@kernel.org>
Hi Chen,
On Mon, 9 Feb 2026 09:59:04 +0800
Chen Ni <nichen@iscas.ac.cn> wrote:
> Fix wrong variable used for error checking after devm_ioremap_resource()
> call. The function checks qmc->scc_pram instead of qmc->dpram, which
> could lead to incorrect error handling.
>
> Fixes: eb680d563089 ("soc: fsl: cpm1: qmc: Add support for QUICC Engine (QE) implementation")
> Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
> ---
> drivers/soc/fsl/qe/qmc.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/soc/fsl/qe/qmc.c b/drivers/soc/fsl/qe/qmc.c
> index c4587b32a59b..672adff8e35f 100644
> --- a/drivers/soc/fsl/qe/qmc.c
> +++ b/drivers/soc/fsl/qe/qmc.c
> @@ -1790,8 +1790,8 @@ static int qmc_qe_init_resources(struct qmc *qmc, struct platform_device *pdev)
> return -EINVAL;
> qmc->dpram_offset = res->start - qe_muram_dma(qe_muram_addr(0));
> qmc->dpram = devm_ioremap_resource(qmc->dev, res);
> - if (IS_ERR(qmc->scc_pram))
> - return PTR_ERR(qmc->scc_pram);
> + if (IS_ERR(qmc->dpram))
> + return PTR_ERR(qmc->dpram);
>
> return 0;
> }
Yes, indeed.
Thanks for the fix.
Acked-by: Herve Codina <herve.codina@bootlin.com>
Best regards,
Hervé
© 2016 - 2026 Red Hat, Inc.