Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/rockchip: dsi: Fix second reference leak in dw_mipi_dsi_rockchip_host_detach()
@ 2026-09-16 18:14 Wentao Liang
  0 siblings, 0 replies; only message in thread
From: Wentao Liang @ 2026-09-16 18:14 UTC (permalink / raw)
  To: airlied
  Cc: andrzej.hajda, andy.yan, dri-devel, heiko, hjc, linux-arm-kernel,
	linux-kernel, linux-rockchip, maarten.lankhorst, mripard, simona,
	tzimmermann, Wentao Liang, stable

The reference to the dual-DSI partner device obtained through
dw_mipi_dsi_rockchip_find_second() is never released after removing
the partner component.  Drop it once component_del() is done.

Fixes: cf6d100dd238 ("drm/rockchip: dsi: add dual mipi support")
Cc: stable@vger.kernel.org
Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>
---
 drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c b/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c
index 2c1f1c53ddda..7f2d3cd28694 100644
--- a/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c
+++ b/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c
@@ -1101,8 +1101,10 @@ static int dw_mipi_dsi_rockchip_host_detach(void *priv_data,
 	struct device *second;
 
 	second = dw_mipi_dsi_rockchip_find_second(dsi);
-	if (second && !IS_ERR(second))
+	if (second && !IS_ERR(second)) {
 		component_del(second, &dw_mipi_dsi_rockchip_ops);
+		put_device(second);
+	}
 
 	component_del(dsi->dev, &dw_mipi_dsi_rockchip_ops);
 
-- 
2.34.1



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-09-16 18:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-16 18:14 [PATCH] drm/rockchip: dsi: Fix second reference leak in dw_mipi_dsi_rockchip_host_detach() Wentao Liang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox