mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-29 13:53:33 +00:00
fbdev: au1200fb: Fix missing IRQ check in au1200fb_drv_probe
[ Upstream commit4e88761f5f
] 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:1630d85a83
("au1200fb: fix hardcoded IRQ") Signed-off-by: Zhang Shurong <zhang_shurong@foxmail.com> Signed-off-by: Helge Deller <deller@gmx.de> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
a44ff12573
commit
50e4b32d2e
1 changed files with 3 additions and 0 deletions
|
@ -1732,6 +1732,9 @@ static int au1200fb_drv_probe(struct platform_device *dev)
|
|||
|
||||
/* Now hook interrupt too */
|
||||
irq = platform_get_irq(dev, 0);
|
||||
if (irq < 0)
|
||||
return irq;
|
||||
|
||||
ret = request_irq(irq, au1200fb_handle_irq,
|
||||
IRQF_SHARED, "lcd", (void *)dev);
|
||||
if (ret) {
|
||||
|
|
Loading…
Reference in a new issue