All of lore.kernel.org
 help / color / mirror / Atom feed
From: <Balamanikandan.Gunasundar@microchip.com>
To: <fourier.thomas@gmail.com>
Cc: <stable@vger.kernel.org>, <miquel.raynal@bootlin.com>,
	<richard@nod.at>, <vigneshr@ti.com>,
	<u.kleine-koenig@baylibre.com>, <vipin.kumar@st.com>,
	<artem.bityutskiy@linux.intel.com>, <vireshk@kernel.org>,
	<David.Woodhouse@intel.com>, <linux-mtd@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>,
	<Balamanikandan.Gunasundar@microchip.com>
Subject: Re: [PATCH v2] mtd: rawnand: atmel: Add missing check after DMA map
Date: Wed, 2 Jul 2025 10:48:14 +0000	[thread overview]
Message-ID: <58924d4f-2d29-4edb-95e9-ee7ccdb688d0@microchip.com> (raw)
In-Reply-To: <20250702065806.20983-2-fourier.thomas@gmail.com>

Wrong subject prefix ?

On 02/07/25 12:28 pm, Thomas Fourier wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> The DMA map functions can fail and should be tested for errors.
> 
> Fixes: 4774fb0a48aa ("mtd: nand/fsmc: Add DMA support")
> Signed-off-by: Thomas Fourier <fourier.thomas@gmail.com>
> ---
> v1 -> v2:
> - Add stable@vger.kernel.org
> - Fix subject prefix
> 
>   drivers/mtd/nand/raw/fsmc_nand.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/mtd/nand/raw/fsmc_nand.c b/drivers/mtd/nand/raw/fsmc_nand.c
> index d579d5dd60d6..df61db8ce466 100644
> --- a/drivers/mtd/nand/raw/fsmc_nand.c
> +++ b/drivers/mtd/nand/raw/fsmc_nand.c
> @@ -503,6 +503,8 @@ static int dma_xfer(struct fsmc_nand_data *host, void *buffer, int len,
> 
>          dma_dev = chan->device;
>          dma_addr = dma_map_single(dma_dev->dev, buffer, len, direction);
> +       if (dma_mapping_error(dma_dev->dev, dma_addr))
> +               return -EINVAL;
> 
>          if (direction == DMA_TO_DEVICE) {
>                  dma_src = dma_addr;
> --
> 2.43.0
> 
> 
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/


      parent reply	other threads:[~2025-07-02 10:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-02  6:58 [PATCH v2] mtd: rawnand: atmel: Add missing check after DMA map Thomas Fourier
2025-07-02  6:58 ` Thomas Fourier
2025-07-02  7:00 ` kernel test robot
2025-07-02 10:48 ` Balamanikandan.Gunasundar [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=58924d4f-2d29-4edb-95e9-ee7ccdb688d0@microchip.com \
    --to=balamanikandan.gunasundar@microchip.com \
    --cc=David.Woodhouse@intel.com \
    --cc=artem.bityutskiy@linux.intel.com \
    --cc=fourier.thomas@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=richard@nod.at \
    --cc=stable@vger.kernel.org \
    --cc=u.kleine-koenig@baylibre.com \
    --cc=vigneshr@ti.com \
    --cc=vipin.kumar@st.com \
    --cc=vireshk@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 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.