drm/msm/dp: use correct lifetime device for devm_drm_bridge_add
authorDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Wed, 11 Oct 2023 21:47:05 +0000 (00:47 +0300)
committerDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Wed, 11 Oct 2023 23:42:10 +0000 (02:42 +0300)
The lifetime of the created drm_bridge is attached to the drm_device
rather than the DP's platform_device. Use correct lifetime for
devm_drm_bridge_add() call.

Fixes: 61a72d5efce5 ("drm/msm/dp: switch to devm_drm_bridge_add()")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Patchwork: https://patchwork.freedesktop.org/patch/562203/
Link: https://lore.kernel.org/r/20231011214705.375738-4-dmitry.baryshkov@linaro.org
drivers/gpu/drm/msm/dp/dp_drm.c

index 284ff7df058aa79c3f203ff196a7ff8dadb6f04f..40e7344180e3e0e8d4f99804835d5ab51a12a842 100644 (file)
@@ -307,7 +307,7 @@ int dp_bridge_init(struct msm_dp *dp_display, struct drm_device *dev,
                        DRM_BRIDGE_OP_MODES;
        }
 
-       rc = devm_drm_bridge_add(&dp_display->pdev->dev, bridge);
+       rc = devm_drm_bridge_add(dev->dev, bridge);
        if (rc) {
                DRM_ERROR("failed to add bridge, rc=%d\n", rc);