mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-09-22 09:34:56 +02:00
Input: synaptics-rmi4 - unregister function handlers on physical driver registration failure
commit6251f7d347upstream. If rmi_register_physical_driver() fails, the current error path unregisters only the RMI bus. The function handlers registered earlier remain registered with the driver core. Add a separate error path to unregister the function handlers before unregistering the bus in this failure case. Fixes:2b6a321da9("Input: synaptics-rmi4 - add support for Synaptics RMI4 devices") Signed-off-by: Haoxiang Li <haoxiang_li2024@163.com> Cc: stable@vger.kernel.org Link: https://patch.msgid.link/20260610064633.2837084-1-haoxiang_li2024@163.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
8f9b0cb58a
commit
5bd64ed8dd
@@ -448,11 +448,13 @@ static int __init rmi_bus_init(void)
|
||||
if (error) {
|
||||
pr_err("%s: error registering the RMI physical driver: %d\n",
|
||||
__func__, error);
|
||||
goto err_unregister_bus;
|
||||
goto err_unregister_function_handlers;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
err_unregister_function_handlers:
|
||||
rmi_unregister_function_handlers();
|
||||
err_unregister_bus:
|
||||
bus_unregister(&rmi_bus_type);
|
||||
return error;
|
||||
|
||||
Reference in New Issue
Block a user