* [PATCH] Input: synaptics-rmi4 - unregister function handlers on physical driver registration failure
@ 2026-06-10 6:46 Haoxiang Li
2026-06-10 23:41 ` Dmitry Torokhov
0 siblings, 1 reply; 2+ messages in thread
From: Haoxiang Li @ 2026-06-10 6:46 UTC (permalink / raw)
To: dmitry.torokhov, git, Marge.Yang, kees, jiapeng.chong
Cc: linux-input, linux-kernel, Haoxiang Li, stable
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: d6e680837ec5 ("Input: synaptics-rmi4 - fix function name in kerneldoc")
Cc: stable@vger.kernel.org
Signed-off-by: Haoxiang Li <haoxiang_li2024@163.com>
---
drivers/input/rmi4/rmi_bus.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/input/rmi4/rmi_bus.c b/drivers/input/rmi4/rmi_bus.c
index 687cb987bc13..ade57e2a7201 100644
--- a/drivers/input/rmi4/rmi_bus.c
+++ b/drivers/input/rmi4/rmi_bus.c
@@ -455,11 +455,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;
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Input: synaptics-rmi4 - unregister function handlers on physical driver registration failure
2026-06-10 6:46 [PATCH] Input: synaptics-rmi4 - unregister function handlers on physical driver registration failure Haoxiang Li
@ 2026-06-10 23:41 ` Dmitry Torokhov
0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Torokhov @ 2026-06-10 23:41 UTC (permalink / raw)
To: Haoxiang Li
Cc: git, Marge.Yang, kees, jiapeng.chong, linux-input, linux-kernel,
stable
Hi Haoxiang,
On Wed, Jun 10, 2026 at 02:46:33PM +0800, Haoxiang Li wrote:
> 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: d6e680837ec5 ("Input: synaptics-rmi4 - fix function name in kerneldoc")
This is not correct commit for fixes. I changed this to
2b6a321da9a2 ("Input: synaptics-rmi4 - add support for Synaptics RMI4 devices")
and applied, thank you.
Thanks.
--
Dmitry
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-06-10 23:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-10 6:46 [PATCH] Input: synaptics-rmi4 - unregister function handlers on physical driver registration failure Haoxiang Li
2026-06-10 23:41 ` Dmitry Torokhov
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.