[PATCH 2/2] drm/bridge: ti-sn65dsi86: fix OF node leak

Johan Hovold johan at kernel.org
Tue Jul 8 08:51:24 UTC 2025


Make sure to drop the OF node reference taken when creating the bridge
device when the device is later released.

Fixes: a1e3667a9835 ("drm/bridge: ti-sn65dsi86: Promote the AUX channel to its own sub-dev")
Cc: Douglas Anderson <dianders at chromium.org>
Signed-off-by: Johan Hovold <johan at kernel.org>
---
 drivers/gpu/drm/bridge/ti-sn65dsi86.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi86.c b/drivers/gpu/drm/bridge/ti-sn65dsi86.c
index de9c23537465..79f4d02f24cb 100644
--- a/drivers/gpu/drm/bridge/ti-sn65dsi86.c
+++ b/drivers/gpu/drm/bridge/ti-sn65dsi86.c
@@ -467,6 +467,7 @@ static void ti_sn65dsi86_aux_device_release(struct device *dev)
 {
 	struct auxiliary_device *aux = container_of(dev, struct auxiliary_device, dev);
 
+	of_node_put(dev->of_node);
 	kfree(aux);
 }
 
@@ -490,6 +491,7 @@ static int ti_sn65dsi86_add_aux_device(struct ti_sn65dsi86 *pdata,
 	device_set_of_node_from_dev(&aux->dev, dev);
 	ret = auxiliary_device_init(aux);
 	if (ret) {
+		of_node_put(aux->dev.of_node);
 		kfree(aux);
 		return ret;
 	}
-- 
2.49.0



More information about the dri-devel mailing list