mirror of
https://github.com/LineageOS/android_kernel_fxtec_sm6115.git
synced 2026-08-18 12:21:01 +00:00
fbdev: au1200fb: Fix a memory leak in au1200fb_drv_probe()
[ Upstream commit ce4e25198a6aaaaf36248edf8daf3d744ec8e309 ]
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>
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Ulrich Hecht <uli@kernel.org>
This commit is contained in:
@ -1744,8 +1744,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);
|
||||
|
||||
Reference in New Issue
Block a user