Skip to content
/ linux Public

Commit af521c7

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 751f60b commit af521c7

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
@@ -1777,8 +1777,8 @@ static int qmc_qe_init_resources(struct qmc *qmc, struct platform_device *pdev)
17771777
return -EINVAL;
17781778
qmc->dpram_offset = res->start - qe_muram_dma(qe_muram_addr(0));
17791779
qmc->dpram = devm_ioremap_resource(qmc->dev, res);
1780-
if (IS_ERR(qmc->scc_pram))
1781-
return PTR_ERR(qmc->scc_pram);
1780+
if (IS_ERR(qmc->dpram))
1781+
return PTR_ERR(qmc->dpram);
17821782

17831783
return 0;
17841784
}

0 commit comments

Comments
 (0)