summary refs log tree commit diff
path: root/drivers/gpu/drm/bridge
diff options
context:
space:
mode:
authorLiang He <windhl@126.com>2022-07-19 14:54:46 +0800
committerRobert Foss <robert.foss@linaro.org>2022-07-19 14:48:31 +0200
commit1d43a5120ab49f22ba6c5901ad3994e254510303 (patch)
tree427b0524b13ff696331ef09b15b03b6e91da7e96 /drivers/gpu/drm/bridge
parent8f48dbd6deaf5a14c924c1de08bf7e36526bf3e7 (diff)
downloadlinux-1d43a5120ab49f22ba6c5901ad3994e254510303.tar.gz
drm/bridge: anx7625: Fix refcount bug in anx7625_parse_dt()
In anx7625_parse_dt(), 'pdata->mipi_host_node' will be assigned a
new reference with of_graph_get_remote_node() which will increase
the refcount of the object, correspondingly, we should call
of_node_put() for the old reference stored in the 'pdata->mipi_host_node'.

Fixes: 8bdfc5dae4e3 ("drm/bridge: anx7625: Add anx7625 MIPI DSI/DPI to DP")
Signed-off-by: Liang He <windhl@126.com>
Reviewed-by: Robert Foss <robert.foss@linaro.org>
Signed-off-by: Robert Foss <robert.foss@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20220719065447.1080817-1-windhl@126.com
Diffstat (limited to 'drivers/gpu/drm/bridge')
-rw-r--r--drivers/gpu/drm/bridge/analogix/anx7625.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.c b/drivers/gpu/drm/bridge/analogix/anx7625.c
index d1f1d525aeb6..79fc7a50b497 100644
--- a/drivers/gpu/drm/bridge/analogix/anx7625.c
+++ b/drivers/gpu/drm/bridge/analogix/anx7625.c
@@ -1642,6 +1642,7 @@ static int anx7625_parse_dt(struct device *dev,
 	anx7625_get_swing_setting(dev, pdata);
 
 	pdata->is_dpi = 0; /* default dsi mode */
+	of_node_put(pdata->mipi_host_node);
 	pdata->mipi_host_node = of_graph_get_remote_node(np, 0, 0);
 	if (!pdata->mipi_host_node) {
 		DRM_DEV_ERROR(dev, "fail to get internal panel.\n");