* [PATCH] fbdev: au1200fb: Fix a memory leak in au1200fb_drv_probe()
@ 2026-02-03 12:14 Felix Gu
2026-02-06 19:32 ` Helge Deller
0 siblings, 1 reply; 2+ messages in thread
From: Felix Gu @ 2026-02-03 12:14 UTC (permalink / raw)
To: Helge Deller, Zhang Shurong
Cc: linux-fbdev, dri-devel, linux-kernel, Felix Gu
In au1200fb_drv_probe(), when platform_get_irq fails(), it directly
returns from the function with an error code, which causes a memory
leak.
Replace it with a goto label to ensure proper cleanup.
Fixes: 4e88761f5f8c ("fbdev: au1200fb: Fix missing IRQ check in au1200fb_drv_probe")
Signed-off-by: Felix Gu <ustc.gu@gmail.com>
---
drivers/video/fbdev/au1200fb.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/video/fbdev/au1200fb.c b/drivers/video/fbdev/au1200fb.c
index ed770222660b..685e629e7e16 100644
--- a/drivers/video/fbdev/au1200fb.c
+++ b/drivers/video/fbdev/au1200fb.c
@@ -1724,8 +1724,10 @@ static int au1200fb_drv_probe(struct platform_device *dev)
/* Now hook interrupt too */
irq = platform_get_irq(dev, 0);
- if (irq < 0)
- return irq;
+ if (irq < 0) {
+ ret = irq;
+ goto failed;
+ }
ret = request_irq(irq, au1200fb_handle_irq,
IRQF_SHARED, "lcd", (void *)dev);
---
base-commit: 193579fe01389bc21aff0051d13f24e8ea95b47d
change-id: 20260203-au1200fb-7762442bc6f0
Best regards,
--
Felix Gu <ustc.gu@gmail.com>
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] fbdev: au1200fb: Fix a memory leak in au1200fb_drv_probe()
2026-02-03 12:14 [PATCH] fbdev: au1200fb: Fix a memory leak in au1200fb_drv_probe() Felix Gu
@ 2026-02-06 19:32 ` Helge Deller
0 siblings, 0 replies; 2+ messages in thread
From: Helge Deller @ 2026-02-06 19:32 UTC (permalink / raw)
To: Felix Gu, Zhang Shurong; +Cc: linux-fbdev, dri-devel, linux-kernel
On 2/3/26 13:14, Felix Gu wrote:
> In au1200fb_drv_probe(), when platform_get_irq fails(), it directly
> returns from the function with an error code, which causes a memory
> leak.
>
> Replace it with a goto label to ensure proper cleanup.
>
> Fixes: 4e88761f5f8c ("fbdev: au1200fb: Fix missing IRQ check in au1200fb_drv_probe")
> Signed-off-by: Felix Gu <ustc.gu@gmail.com>
> ---
> drivers/video/fbdev/au1200fb.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
applied.
Thanks!
Helge
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-02-06 19:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-03 12:14 [PATCH] fbdev: au1200fb: Fix a memory leak in au1200fb_drv_probe() Felix Gu
2026-02-06 19:32 ` Helge Deller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox