]> git.baikalelectronics.ru Git - kernel.git/commit
fbdev: arcfb: Fix error handling in arcfb_probe()
authorZongjie Li <u202112089@hust.edu.cn>
Tue, 9 May 2023 11:27:26 +0000 (19:27 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 24 May 2023 16:32:33 +0000 (17:32 +0100)
commit842f9d407c9ec2ca804a4fa2000c77eb9a5585d6
treefa36b7a49df3ed328b9474b763215d2be44a2d79
parenteb2e7bcf8875129bc702652abe5925d085801a5d
fbdev: arcfb: Fix error handling in arcfb_probe()

[ Upstream commit 5a6bef734247c7a8c19511664ff77634ab86f45b ]

Smatch complains that:
arcfb_probe() warn: 'irq' from request_irq() not released on lines: 587.

Fix error handling in the arcfb_probe() function. If IO addresses are
not provided or framebuffer registration fails, the code will jump to
the err_addr or err_register_fb label to release resources.
If IRQ request fails, previously allocated resources will be freed.

Fixes: a15865263a32 ("[PATCH] Framebuffer driver for Arc LCD board")
Signed-off-by: Zongjie Li <u202112089@hust.edu.cn>
Reviewed-by: Dongliang Mu <dzm91@hust.edu.cn>
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/video/fbdev/arcfb.c