Hi,

On 01/11/2026 16:14, Aradhya Bhatia wrote:
Hi Tomi,

On 29/10/26 10:18, Tomi Valkeinen wrote:
tidss_oldi_init() registers a bridge for each OLDI TX in turn. If a later
OLDI TX fails, the bridges registered for the earlier ones are not
removed.

Fix this by calling tidss_oldi_deinit() in the error path.

Fixes: 7246e0929945 ("drm/tidss: Add OLDI bridge support")
Signed-off-by: Tomi Valkeinen <[email protected]>
---
  drivers/gpu/drm/tidss/tidss_oldi.c | 1 +
  1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/tidss/tidss_oldi.c 
b/drivers/gpu/drm/tidss/tidss_oldi.c
index 506507e83112..7344d86e1f13 100644
--- a/drivers/gpu/drm/tidss/tidss_oldi.c
+++ b/drivers/gpu/drm/tidss/tidss_oldi.c
@@ -638,5 +638,6 @@ int tidss_oldi_init(struct tidss_device *tidss)
  err_put_node:
        of_node_put(child);
        of_node_put(oldi_parent);
+       tidss_oldi_deinit(tidss);
        return ret;
  }


Since tidss_probe() (in tidss_drv.c) calls tidss_oldi_init(), it also
calls tidss_oldi_deinit() in its error exit path.
Yes, but not if tidss_oldi_init() itself fails.

If we have two OLDI TXes, and the loop in tidss_oldi_init() inits the first one, then the second one's init fails, the code jumps to err_put_node. If we don't call tidss_oldi_deinit() there, the first OLDI TX will not be "deinited".

 Tomi

Reply via email to