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_attach()
@ 2026-09-16 18:13 Wentao Liang
  0 siblings, 0 replies; only message in thread
From: Wentao Liang @ 2026-09-16 18:13 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 dropped on neither the success
path nor when adding the partner as a component fails.  Release it on
both paths.

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 | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c b/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c
index 4ab29410b2c0..2c1f1c53ddda 100644
--- a/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c
+++ b/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c
@@ -1079,8 +1079,10 @@ static int dw_mipi_dsi_rockchip_host_attach(void *priv_data,
 			DRM_DEV_ERROR(second,
 				      "Failed to register component: %d\n",
 				      ret);
+			put_device(second);
 			goto out;
 		}
+		put_device(second);
 	}
 
 	return 0;
-- 
2.34.1



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

only message in thread, other threads:[~2026-09-16 18:13 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:13 [PATCH] drm/rockchip: dsi: Fix second reference leak in dw_mipi_dsi_rockchip_host_attach() Wentao Liang

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