From: Dan Carpenter <error27@gmail.com>
To: christian.taedcke@weidmueller.com
Cc: Vinod Koul <vkoul@kernel.org>, Frank Li <Frank.Li@kernel.org>,
christian.taedcke-oss@weidmueller.com, dmaengine@vger.kernel.org,
linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH v2] dmaengine: nbpfaxi: Fix setting channel irqs in probe()
Date: Thu, 9 Jul 2026 13:32:29 +0300 [thread overview]
Message-ID: <ak94vVkvQEocJuSI@stanley.mountain> (raw)
In-Reply-To: <20260702-upstreaming-nbpfaxi-v1-v2-1-e6d6b178a278@weidmueller.com>
On Thu, Jul 02, 2026 at 05:28:03PM +0200, Christian Taedcke via B4 Relay wrote:
> diff --git a/drivers/dma/nbpfaxi.c b/drivers/dma/nbpfaxi.c
> index 05d7321629cc..bcfab62a71d7 100644
> --- a/drivers/dma/nbpfaxi.c
> +++ b/drivers/dma/nbpfaxi.c
> @@ -1374,14 +1374,12 @@ static int nbpf_probe(struct platform_device *pdev)
> if (irqs == num_channels + 1) {
> struct nbpf_channel *chan;
>
> - for (i = 0, chan = nbpf->chan; i < num_channels;
> - i++, chan++) {
> + for (i = 0, chan = nbpf->chan; i < irqs; i++) {
> /* Skip the error IRQ */
> if (irqbuf[i] == eirq)
> - i++;
> - if (i >= ARRAY_SIZE(irqbuf))
> - return -EINVAL;
> + continue;
> chan->irq = irqbuf[i];
> + chan++;
If we don't hit the continue then this could still corrupt memory.
regards,
dan carpenter
prev parent reply other threads:[~2026-07-09 10:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-02 15:28 [PATCH v2] dmaengine: nbpfaxi: Fix setting channel irqs in probe() Christian Taedcke via B4 Relay
2026-07-09 10:32 ` Dan Carpenter [this message]
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=ak94vVkvQEocJuSI@stanley.mountain \
--to=error27@gmail.com \
--cc=Frank.Li@kernel.org \
--cc=christian.taedcke-oss@weidmueller.com \
--cc=christian.taedcke@weidmueller.com \
--cc=dmaengine@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=vkoul@kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox