mirror of
https://github.com/torvalds/linux.git
synced 2026-05-12 16:18:45 +02:00
drm/exynos: remove bridge when component_add fails
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: 576d72fbfb ("drm/exynos: mic: add a bridge at probe")
Cc: stable@vger.kernel.org
Reviewed-by: Raphaël Gallais-Pou <rgallaispou@gmail.com>
Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Link: https://patch.msgid.link/20260423200622.325076-2-osama.abdelkader@gmail.com
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
This commit is contained in:
parent
2d4e80271f
commit
26f6654a9a
|
|
@ -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[] = {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user