* [PATCH v3 2/3] drm/exynos: remove bridge when component_add fails [not found] <20260423200622.325076-1-osama.abdelkader@gmail.com> @ 2026-04-23 20:06 ` Osama Abdelkader 2026-04-29 11:43 ` Luca Ceresoli 2026-05-04 20:47 ` Raphaël Gallais-Pou 0 siblings, 2 replies; 3+ messages in thread From: Osama Abdelkader @ 2026-04-23 20:06 UTC (permalink / raw) To: luca.ceresoli, Inki Dae, Seung-Woo Kim, Kyungmin Park, David Airlie, Simona Vetter, Krzysztof Kozlowski, Alim Akhtar, Andrzej Hajda, Hoegeun Kwon, dri-devel, linux-arm-kernel, linux-samsung-soc, linux-kernel Cc: Osama Abdelkader, stable Use devm_drm_bridge_add() so the bridge is released if probe fails after registration, and drop the manual drm_bridge_remove() in remove(). Check the return value of devm_drm_bridge_add(). Signed-off-by: Osama Abdelkader <osama.abdelkader@gmail.com> Fixes: 576d72fbfb45 ("drm/exynos: mic: add a bridge at probe") Cc: stable@vger.kernel.org --- v3: add Fixes and Cc tags v2: devm_drm_bridge_add instead of drm_bridge_add + goto remove_bridge --- drivers/gpu/drm/exynos/exynos_drm_mic.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_mic.c b/drivers/gpu/drm/exynos/exynos_drm_mic.c index 29a8366513fa..e68c954ec3e6 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_mic.c +++ b/drivers/gpu/drm/exynos/exynos_drm_mic.c @@ -423,7 +423,9 @@ static int exynos_mic_probe(struct platform_device *pdev) mic->bridge.of_node = dev->of_node; - drm_bridge_add(&mic->bridge); + ret = devm_drm_bridge_add(dev, &mic->bridge); + if (ret) + goto err; pm_runtime_enable(dev); @@ -443,12 +445,8 @@ static int exynos_mic_probe(struct platform_device *pdev) static void exynos_mic_remove(struct platform_device *pdev) { - struct exynos_mic *mic = platform_get_drvdata(pdev); - component_del(&pdev->dev, &exynos_mic_component_ops); pm_runtime_disable(&pdev->dev); - - drm_bridge_remove(&mic->bridge); } static const struct of_device_id exynos_mic_of_match[] = { -- 2.43.0 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v3 2/3] drm/exynos: remove bridge when component_add fails 2026-04-23 20:06 ` [PATCH v3 2/3] drm/exynos: remove bridge when component_add fails Osama Abdelkader @ 2026-04-29 11:43 ` Luca Ceresoli 2026-05-04 20:47 ` Raphaël Gallais-Pou 1 sibling, 0 replies; 3+ messages in thread From: Luca Ceresoli @ 2026-04-29 11:43 UTC (permalink / raw) To: Osama Abdelkader, Inki Dae, Seung-Woo Kim, Kyungmin Park, David Airlie, Simona Vetter, Krzysztof Kozlowski, Alim Akhtar, Andrzej Hajda, Hoegeun Kwon, dri-devel, linux-arm-kernel, linux-samsung-soc, linux-kernel Cc: stable On Thu Apr 23, 2026 at 10:06 PM CEST, Osama Abdelkader wrote: > Use devm_drm_bridge_add() so the bridge is released if probe fails after > registration, and drop the manual drm_bridge_remove() in remove(). > > Check the return value of devm_drm_bridge_add(). > > Signed-off-by: Osama Abdelkader <osama.abdelkader@gmail.com> > Fixes: 576d72fbfb45 ("drm/exynos: mic: add a bridge at probe") > Cc: stable@vger.kernel.org Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com> -- Luca Ceresoli, Bootlin Embedded Linux and Kernel engineering https://bootlin.com ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v3 2/3] drm/exynos: remove bridge when component_add fails 2026-04-23 20:06 ` [PATCH v3 2/3] drm/exynos: remove bridge when component_add fails Osama Abdelkader 2026-04-29 11:43 ` Luca Ceresoli @ 2026-05-04 20:47 ` Raphaël Gallais-Pou 1 sibling, 0 replies; 3+ messages in thread From: Raphaël Gallais-Pou @ 2026-05-04 20:47 UTC (permalink / raw) To: Osama Abdelkader, luca.ceresoli, Inki Dae, Seung-Woo Kim, Kyungmin Park, David Airlie, Simona Vetter, Krzysztof Kozlowski, Alim Akhtar, Andrzej Hajda, Hoegeun Kwon, dri-devel, linux-arm-kernel, linux-samsung-soc, linux-kernel Cc: stable On 4/23/26 22:06, Osama Abdelkader wrote: > Use devm_drm_bridge_add() so the bridge is released if probe fails after > registration, and drop the manual drm_bridge_remove() in remove(). > > Check the return value of devm_drm_bridge_add(). > > Signed-off-by: Osama Abdelkader <osama.abdelkader@gmail.com> > Fixes: 576d72fbfb45 ("drm/exynos: mic: add a bridge at probe") > Cc: stable@vger.kernel.org > --- > v3: add Fixes and Cc tags > v2: devm_drm_bridge_add instead of drm_bridge_add + goto remove_bridge > --- Hi, Reviewed-by: Raphaël Gallais-Pou <rgallaispou@gmail.com> Best regards, Raphaël ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-05-04 20:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20260423200622.325076-1-osama.abdelkader@gmail.com>
2026-04-23 20:06 ` [PATCH v3 2/3] drm/exynos: remove bridge when component_add fails Osama Abdelkader
2026-04-29 11:43 ` Luca Ceresoli
2026-05-04 20:47 ` Raphaël Gallais-Pou
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox