All of lore.kernel.org
 help / color / mirror / Atom feed
From: Herve Codina <herve.codina@bootlin.com>
To: Chen Ni <nichen@iscas.ac.cn>
Cc: qiang.zhao@nxp.com, chleroy@kernel.org,
	linuxppc-dev@lists.ozlabs.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] soc: fsl: cpm1: qmc: Fix error check for devm_ioremap_resource() in qmc_qe_init_resources()
Date: Mon, 9 Feb 2026 08:50:35 +0100	[thread overview]
Message-ID: <20260209085035.1d7db80a@bootlin.com> (raw)
In-Reply-To: <20260209015904.871269-1-nichen@iscas.ac.cn>

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é


  reply	other threads:[~2026-02-09  7:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-09  1:59 [PATCH] soc: fsl: cpm1: qmc: Fix error check for devm_ioremap_resource() in qmc_qe_init_resources() Chen Ni
2026-02-09  7:50 ` Herve Codina [this message]
2026-02-09  9:04 ` Christophe Leroy (CS GROUP)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260209085035.1d7db80a@bootlin.com \
    --to=herve.codina@bootlin.com \
    --cc=chleroy@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=nichen@iscas.ac.cn \
    --cc=qiang.zhao@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.