* [PATCH v3 1/2] drm/bridge: chipone-icn6211: use devm_drm_bridge_add in i2c probe
@ 2026-04-23 20:05 Osama Abdelkader
0 siblings, 0 replies; only message in thread
From: Osama Abdelkader @ 2026-04-23 20:05 UTC (permalink / raw)
To: luca.ceresoli, Jagan Teki, Andrzej Hajda, Neil Armstrong,
Robert Foss, Laurent Pinchart, Jonas Karlman, Jernej Skrabec,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
Simona Vetter, Marek Vasut, dri-devel, linux-kernel
Cc: Osama Abdelkader, stable
Use devm_drm_bridge_add() so the bridge is released if probe fails after
registration, and drop drm_bridge_remove() in chipone_i2c_probe.
Signed-off-by: Osama Abdelkader <osama.abdelkader@gmail.com>
Fixes: 8dde6f7452a1 ("drm: bridge: icn6211: Add I2C configuration support")
Cc: stable@vger.kernel.org
---
v3: split the patch into two, one for i2c probe (bugfix) and one for dsi probe,
and add Fixes and Cc tags
v2: devm_drm_bridge_add instead of drm_bridge_add
---
drivers/gpu/drm/bridge/chipone-icn6211.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/bridge/chipone-icn6211.c b/drivers/gpu/drm/bridge/chipone-icn6211.c
index 5bee10c64265..4d76e1bd5e78 100644
--- a/drivers/gpu/drm/bridge/chipone-icn6211.c
+++ b/drivers/gpu/drm/bridge/chipone-icn6211.c
@@ -758,12 +758,12 @@ static int chipone_i2c_probe(struct i2c_client *client)
dev_set_drvdata(dev, icn);
i2c_set_clientdata(client, icn);
- drm_bridge_add(&icn->bridge);
-
- ret = chipone_dsi_host_attach(icn);
+ ret = devm_drm_bridge_add(dev, &icn->bridge);
if (ret)
- drm_bridge_remove(&icn->bridge);
- return ret;
+ return ret;
+
+ return chipone_dsi_host_attach(icn);
+
}
static void chipone_dsi_remove(struct mipi_dsi_device *dsi)
--
2.43.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-04-23 20:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-23 20:05 [PATCH v3 1/2] drm/bridge: chipone-icn6211: use devm_drm_bridge_add in i2c probe Osama Abdelkader
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox