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)
committerHelge Deller <deller@gmx.de>
Thu, 11 May 2023 13:22:15 +0000 (15:22 +0200)
commit5a6bef734247c7a8c19511664ff77634ab86f45b
treea02d6414a949faa3cbebc9ac67713e45a7ea9c62
parentac9a78681b921877518763ba0e89202254349d1b
fbdev: arcfb: Fix error handling in arcfb_probe()

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: 1154ea7dcd8e ("[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>
drivers/video/fbdev/arcfb.c