diff mbox series

[v2,08/16] drm/bridge/lvds-codec: Keep up with refcounting

Message ID 20250619-b4-of_drm_find_panel_part1-v2-8-0df94aecc43d@redhat.com
State New
Headers show
Series Use drm_panel_get/put() in of_drm_find_panel() and its callers | expand

Commit Message

Anusha Srivatsa June 19, 2025, 7:16 p.m. UTC
The panel returned by of_drm_find_panel() is for
calling devm_drm_panel_bridge_add_typed and not
anywhere after that.

Put the panel reference accordingly.

Patch added in v2.

Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
---
 drivers/gpu/drm/bridge/lvds-codec.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/drivers/gpu/drm/bridge/lvds-codec.c b/drivers/gpu/drm/bridge/lvds-codec.c
index e6a7147e141b64fc77dfef03a737ee599a0ecd10..72ac427e7b88b884ce07b52212639e518dbe4bec 100644
--- a/drivers/gpu/drm/bridge/lvds-codec.c
+++ b/drivers/gpu/drm/bridge/lvds-codec.c
@@ -154,6 +154,7 @@  static int lvds_codec_probe(struct platform_device *pdev)
 	lvds_codec->panel_bridge =
 		devm_drm_panel_bridge_add_typed(dev, panel,
 						lvds_codec->connector_type);
+	drm_panel_put(panel);
 	if (IS_ERR(lvds_codec->panel_bridge))
 		return PTR_ERR(lvds_codec->panel_bridge);