[PATCH] drm/rockchip: dsi: Fix second reference leak in dw_mipi_dsi_rockchip_host_detach()
From: Wentao Liang
Date: Wed Sep 16 2026 - 15:20:12 EST
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@xxxxxxxxxxxxxxx
Signed-off-by: Wentao Liang <vulab@xxxxxxxxxxx>
---
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