diff options
author | Zhang Shurong | 2023-07-15 16:16:56 +0800 |
---|---|---|
committer | Greg Kroah-Hartman | 2023-07-27 08:50:45 +0200 |
commit | 50e4b32d2e58b7487ebb0a16d5de9cbde56f7949 (patch) | |
tree | b4c5ef288d8474103e349173e11526698ee5c4ab /drivers/video | |
parent | a44ff125731f18a7bacd48be4e3a6e4df322a9ac (diff) |
fbdev: au1200fb: Fix missing IRQ check in au1200fb_drv_probe
[ Upstream commit 4e88761f5f8c7869f15a2046b1a1116f4fab4ac8 ]
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: 1630d85a8312 ("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>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/fbdev/au1200fb.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/video/fbdev/au1200fb.c b/drivers/video/fbdev/au1200fb.c index b6b22fa4a8a0..fd3ff398d234 100644 --- a/drivers/video/fbdev/au1200fb.c +++ b/drivers/video/fbdev/au1200fb.c @@ -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) { |