]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
fbdev: via: Fix error in via_core_init()
authorShang XiaoJing <shangxiaojing@huawei.com>
Mon, 14 Nov 2022 01:08:52 +0000 (09:08 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 7 Jan 2023 11:07:27 +0000 (12:07 +0100)
commit5bf10c3be038a0b5b79fd8d69920b72bdcb59d2d
tree6a5df11487007af655ad98d06f97ac55a04ba141
parent0a71d0472cf2c420ca5ef99b71a292aa648301e2
fbdev: via: Fix error in via_core_init()

[ Upstream commit 5886b130de953cfb8826f7771ec8640a79934a7f ]

via_core_init() won't exit the driver when pci_register_driver() failed.
Exit the viafb-i2c and the viafb-gpio in failed path to prevent error.

VIA Graphics Integration Chipset framebuffer 2.4 initializing
Error: Driver 'viafb-i2c' is already registered, aborting...
Error: Driver 'viafb-gpio' is already registered, aborting...

Fixes: 7582eb9be85f ("viafb: Turn GPIO and i2c into proper platform devices")
Signed-off-by: Shang XiaoJing <shangxiaojing@huawei.com>
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/video/fbdev/via/via-core.c