Skip to content
/ linux Public

Commit 294e0c8

Browse files
Chen Nigregkh
authored andcommitted
soc: fsl: cpm1: qmc: Fix error check for devm_ioremap_resource() in qmc_qe_init_resources()
[ Upstream commit 3f4e403 ] 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: eb680d5 ("soc: fsl: cpm1: qmc: Add support for QUICC Engine (QE) implementation") Signed-off-by: Chen Ni <nichen@iscas.ac.cn> Acked-by: Herve Codina <herve.codina@bootlin.com> Link: https://lore.kernel.org/r/20260209015904.871269-1-nichen@iscas.ac.cn Signed-off-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 85dbbf7 commit 294e0c8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/soc/fsl/qe/qmc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1799,8 +1799,8 @@ static int qmc_qe_init_resources(struct qmc *qmc, struct platform_device *pdev)
17991799
return -EINVAL;
18001800
qmc->dpram_offset = res->start - qe_muram_dma(qe_muram_addr(0));
18011801
qmc->dpram = devm_ioremap_resource(qmc->dev, res);
1802-
if (IS_ERR(qmc->scc_pram))
1803-
return PTR_ERR(qmc->scc_pram);
1802+
if (IS_ERR(qmc->dpram))
1803+
return PTR_ERR(qmc->dpram);
18041804

18051805
return 0;
18061806
}

0 commit comments

Comments
 (0)