* [PATCH] fbdev: vt8500lcdfb: fix missing dma_free_coherent()
@ 2026-01-12 14:00 Thomas Fourier
2026-01-12 14:46 ` Markus Elfring
2026-01-27 17:17 ` Helge Deller
0 siblings, 2 replies; 3+ messages in thread
From: Thomas Fourier @ 2026-01-12 14:00 UTC (permalink / raw)
Cc: Thomas Fourier, stable, Alexey Charkov, Krzysztof Kozlowski,
Helge Deller, Tony Prisk, linux-arm-kernel, linux-fbdev,
dri-devel, linux-kernel
fbi->fb.screen_buffer is alloced with dma_free_coherent() but is not
freed if the error path is reached.
Fixes: e7b995371fe1 ("video: vt8500: Add devicetree support for vt8500-fb and wm8505-fb")
Cc: <stable@vger.kernel.org>
Signed-off-by: Thomas Fourier <fourier.thomas@gmail.com>
---
drivers/video/fbdev/vt8500lcdfb.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/video/fbdev/vt8500lcdfb.c b/drivers/video/fbdev/vt8500lcdfb.c
index b08a6fdc53fd..85c7a99a7d64 100644
--- a/drivers/video/fbdev/vt8500lcdfb.c
+++ b/drivers/video/fbdev/vt8500lcdfb.c
@@ -369,7 +369,7 @@ static int vt8500lcd_probe(struct platform_device *pdev)
if (fbi->palette_cpu == NULL) {
dev_err(&pdev->dev, "Failed to allocate palette buffer\n");
ret = -ENOMEM;
- goto failed_free_io;
+ goto failed_free_mem_virt;
}
irq = platform_get_irq(pdev, 0);
@@ -432,6 +432,9 @@ static int vt8500lcd_probe(struct platform_device *pdev)
failed_free_palette:
dma_free_coherent(&pdev->dev, fbi->palette_size,
fbi->palette_cpu, fbi->palette_phys);
+failed_free_mem_virt:
+ dma_free_coherent(&pdev->dev, fbi->fb.fix.smem_len,
+ fbi->fb.screen_buffer, fbi->fb.fix.smem_start);
failed_free_io:
iounmap(fbi->regbase);
failed_free_res:
--
2.43.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] fbdev: vt8500lcdfb: fix missing dma_free_coherent()
2026-01-12 14:00 [PATCH] fbdev: vt8500lcdfb: fix missing dma_free_coherent() Thomas Fourier
@ 2026-01-12 14:46 ` Markus Elfring
2026-01-27 17:17 ` Helge Deller
1 sibling, 0 replies; 3+ messages in thread
From: Markus Elfring @ 2026-01-12 14:46 UTC (permalink / raw)
To: Thomas Fourier, linux-fbdev, dri-devel, linux-arm-kernel,
Alexey Charkov, Helge Deller, Krzysztof Kozlowski
Cc: stable, LKML
> fbi->fb.screen_buffer is alloced with dma_free_coherent() but is not
allocated with a dma_alloc_coherent() call?
https://elixir.bootlin.com/linux/v6.19-rc4/source/drivers/video/fbdev/vt8500lcdfb.c#L352-L362
> freed if the error path is reached.
See also once more:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.19-rc4#n94
You should probably not only specify message recipients in the header field “Cc”.
Regards,
Markus
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] fbdev: vt8500lcdfb: fix missing dma_free_coherent()
2026-01-12 14:00 [PATCH] fbdev: vt8500lcdfb: fix missing dma_free_coherent() Thomas Fourier
2026-01-12 14:46 ` Markus Elfring
@ 2026-01-27 17:17 ` Helge Deller
1 sibling, 0 replies; 3+ messages in thread
From: Helge Deller @ 2026-01-27 17:17 UTC (permalink / raw)
To: Thomas Fourier; +Cc: linux-fbdev, dri-devel, linux-kernel
On 1/12/26 15:00, Thomas Fourier wrote:
> fbi->fb.screen_buffer is alloced with dma_free_coherent() but is not
I've corrected this to "dma_alloc_coherent()", as pointed out by Mr. Elfring,
and applied it to the fbdev tree.
Thanks!
Helge
> freed if the error path is reached.
>
> Fixes: e7b995371fe1 ("video: vt8500: Add devicetree support for vt8500-fb and wm8505-fb")
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Thomas Fourier <fourier.thomas@gmail.com>
> ---
> drivers/video/fbdev/vt8500lcdfb.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-01-27 17:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-12 14:00 [PATCH] fbdev: vt8500lcdfb: fix missing dma_free_coherent() Thomas Fourier
2026-01-12 14:46 ` Markus Elfring
2026-01-27 17:17 ` Helge Deller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox