Skip to content

Commit 4e88761

Browse files
ZhangShuronghdeller
authored andcommitted
fbdev: au1200fb: Fix missing IRQ check in au1200fb_drv_probe
This func misses checking for platform_get_irq()'s call and may passes the negative error codes to request_irq(), which takes unsigned IRQ #, causing it to fail with -EINVAL, overriding an original error code. Fix this by stop calling request_irq() with invalid IRQ #s. Fixes: 1630d85 ("au1200fb: fix hardcoded IRQ") Signed-off-by: Zhang Shurong <[email protected]> Signed-off-by: Helge Deller <[email protected]>
1 parent 298e082 commit 4e88761

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/video/fbdev/au1200fb.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1732,6 +1732,9 @@ static int au1200fb_drv_probe(struct platform_device *dev)
17321732

17331733
/* Now hook interrupt too */
17341734
irq = platform_get_irq(dev, 0);
1735+
if (irq < 0)
1736+
return irq;
1737+
17351738
ret = request_irq(irq, au1200fb_handle_irq,
17361739
IRQF_SHARED, "lcd", (void *)dev);
17371740
if (ret) {

0 commit comments

Comments
 (0)