Commit ce4e2519 authored by Felix Gu's avatar Felix Gu Committed by Helge Deller
Browse files

fbdev: au1200fb: Fix a memory leak in au1200fb_drv_probe()



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: 4e88761f ("fbdev: au1200fb: Fix missing IRQ check in au1200fb_drv_probe")
Signed-off-by: default avatarFelix Gu <ustc.gu@gmail.com>
Signed-off-by: default avatarHelge Deller <deller@gmx.de>
parent b28da0d0
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -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);