mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-17 09:14:19 +08:00
fbdev: via: Fix error in via_core_init()
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: 7582eb9be8
("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>
This commit is contained in:
parent
ed359a4648
commit
5886b130de
@ -733,7 +733,14 @@ static int __init via_core_init(void)
|
||||
return ret;
|
||||
viafb_i2c_init();
|
||||
viafb_gpio_init();
|
||||
return pci_register_driver(&via_driver);
|
||||
ret = pci_register_driver(&via_driver);
|
||||
if (ret) {
|
||||
viafb_gpio_exit();
|
||||
viafb_i2c_exit();
|
||||
return ret;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void __exit via_core_exit(void)
|
||||
|
Loading…
Reference in New Issue
Block a user