[PATCH] hsi: omap_ssi: remove debugfs on port creation failure
From: Pengpeng Hou
Date: Mon Jun 15 2026 - 20:50:13 EST
ssi_probe() creates the controller debugfs tree before creating the SSI
port child devices. If a port device cannot be created, the error path
removes any children and tears down the controller, but leaves the
debugfs tree behind.
Remove the controller debugfs tree on the port creation failure path,
matching the normal remove path.
Signed-off-by: Pengpeng Hou <pengpeng@xxxxxxxxxxx>
---
drivers/hsi/controllers/omap_ssi_core.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/hsi/controllers/omap_ssi_core.c b/drivers/hsi/controllers/omap_ssi_core.c
index eeacc427fd65..d9be0c3ea351 100644
--- a/drivers/hsi/controllers/omap_ssi_core.c
+++ b/drivers/hsi/controllers/omap_ssi_core.c
@@ -529,6 +529,9 @@ static int ssi_probe(struct platform_device *pd)
return err;
out3:
device_for_each_child(&pd->dev, NULL, ssi_remove_ports);
+#ifdef CONFIG_DEBUG_FS
+ ssi_debug_remove_ctrl(ssi);
+#endif
out2:
ssi_remove_controller(ssi);
pm_runtime_disable(&pd->dev);
--
2.50.1 (Apple Git-155)