Patch "Input: i8042 - fix leaking of platform device on module removal" 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

    Input: i8042 - fix leaking of platform device on module removal

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:
     input-i8042-fix-leaking-of-platform-device-on-module.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 66cf7633bc242f88113816ddb1682dd6e6b6f7e7
Author: Chen Jun <chenjun102@xxxxxxxxxx>
Date:   Fri Nov 18 15:40:03 2022 -0800

    Input: i8042 - fix leaking of platform device on module removal
    
    [ Upstream commit 81cd7e8489278d28794e7b272950c3e00c344e44 ]
    
    Avoid resetting the module-wide i8042_platform_device pointer in
    i8042_probe() or i8042_remove(), so that the device can be properly
    destroyed by i8042_exit() on module unload.
    
    Fixes: 9222ba68c3f4 ("Input: i8042 - add deferred probe support")
    Signed-off-by: Chen Jun <chenjun102@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20221109034148.23821-1-chenjun102@xxxxxxxxxx
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c
index bb76ff2f6b1d..dc40f6099dcf 100644
--- a/drivers/input/serio/i8042.c
+++ b/drivers/input/serio/i8042.c
@@ -1540,8 +1540,6 @@ static int i8042_probe(struct platform_device *dev)
 {
 	int error;
 
-	i8042_platform_device = dev;
-
 	if (i8042_reset == I8042_RESET_ALWAYS) {
 		error = i8042_controller_selftest();
 		if (error)
@@ -1579,7 +1577,6 @@ static int i8042_probe(struct platform_device *dev)
 	i8042_free_aux_ports();	/* in case KBD failed but AUX not */
 	i8042_free_irqs();
 	i8042_controller_reset(false);
-	i8042_platform_device = NULL;
 
 	return error;
 }
@@ -1589,7 +1586,6 @@ static int i8042_remove(struct platform_device *dev)
 	i8042_unregister_ports();
 	i8042_free_irqs();
 	i8042_controller_reset(false);
-	i8042_platform_device = NULL;
 
 	return 0;
 }



[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