mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] mmc: mvsdio: Fix dma_unmap_sg() nents value
@ 2025-08-26  7:58 Thomas Fourier
  2025-08-28 18:33 ` Linus Walleij
  2025-09-12 13:34 ` Ulf Hansson
  0 siblings, 2 replies; 3+ messages in thread
From: Thomas Fourier @ 2025-08-26  7:58 UTC (permalink / raw)
  Cc: Thomas Fourier, Nicolas Pitre, Ulf Hansson, Ingo Molnar,
	Thomas Gleixner, Binbin Zhou, Linus Walleij, Pierre Ossman,
	linux-mmc, linux-kernel

The dma_unmap_sg() functions should be called with the same nents as the
dma_map_sg(), not the value the map function returned.

Fixes: 236caa7cc351 ("mmc: SDIO driver for Marvell SoCs")
Signed-off-by: Thomas Fourier <fourier.thomas@gmail.com>
---
 drivers/mmc/host/mvsdio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/mvsdio.c b/drivers/mmc/host/mvsdio.c
index a9e6277789ba..79df2fa89a3f 100644
--- a/drivers/mmc/host/mvsdio.c
+++ b/drivers/mmc/host/mvsdio.c
@@ -292,7 +292,7 @@ static u32 mvsd_finish_data(struct mvsd_host *host, struct mmc_data *data,
 		host->pio_ptr = NULL;
 		host->pio_size = 0;
 	} else {
-		dma_unmap_sg(mmc_dev(host->mmc), data->sg, host->sg_frags,
+		dma_unmap_sg(mmc_dev(host->mmc), data->sg, data->sg_len,
 			     mmc_get_dma_dir(data));
 	}
 
-- 
2.43.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-09-12 13:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-08-26  7:58 [PATCH] mmc: mvsdio: Fix dma_unmap_sg() nents value Thomas Fourier
2025-08-28 18:33 ` Linus Walleij
2025-09-12 13:34 ` Ulf Hansson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®