Patch "fbdev: via: Fix error in via_core_init()" has been added to the 5.4-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    fbdev: via: Fix error in via_core_init()

to the 5.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     fbdev-via-fix-error-in-via_core_init.patch
and it can be found in the queue-5.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit a53e05d18342855183e90af5a18372eeb0eb63b8
Author: Shang XiaoJing <shangxiaojing@xxxxxxxxxx>
Date:   Mon Nov 14 09:08:52 2022 +0800

    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@xxxxxxxxxx>
    Signed-off-by: Helge Deller <deller@xxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/video/fbdev/via/via-core.c b/drivers/video/fbdev/via/via-core.c
index ffa2ca2d3f5e..ce366b80bda4 100644
--- a/drivers/video/fbdev/via/via-core.c
+++ b/drivers/video/fbdev/via/via-core.c
@@ -732,7 +732,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)



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux