Commit c806d596 authored by Dmitry Baryshkov's avatar Dmitry Baryshkov

drm/msm/dpu: remove extra drm_encoder_cleanup from the error path

The drmm handler will perform drm_encoder_cleanup() for us. Moreover if
we call drm_encoder_cleanup() manually, the drmm_encoder_alloc_release()
will spawn warnings at drivers/gpu/drm/drm_encoder.c:214. Drop these
extra drm_encoder_cleanup() calls.

Fixes: cd42c56d ("drm/msm/dpu: use drmm-managed allocation for dpu_encoder_virt")
Signed-off-by: default avatarDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reported-by: default avatarKonrad Dybcio <konrad.dybcio@linaro.org>
Reviewed-by: default avatarAbhinav Kumar <quic_abhinavk@quicinc.com>
Tested-by: Abhinav Kumar <quic_abhinavk@quicinc.com> #sm8250 CI
Patchwork: https://patchwork.freedesktop.org/patch/571562/
Link: https://lore.kernel.org/r/20231211145440.3647001-1-dmitry.baryshkov@linaro.org
parent 88806318
...@@ -586,7 +586,6 @@ static int _dpu_kms_initialize_displayport(struct drm_device *dev, ...@@ -586,7 +586,6 @@ static int _dpu_kms_initialize_displayport(struct drm_device *dev,
rc = msm_dp_modeset_init(priv->dp[i], dev, encoder); rc = msm_dp_modeset_init(priv->dp[i], dev, encoder);
if (rc) { if (rc) {
DPU_ERROR("modeset_init failed for DP, rc = %d\n", rc); DPU_ERROR("modeset_init failed for DP, rc = %d\n", rc);
drm_encoder_cleanup(encoder);
return rc; return rc;
} }
} }
...@@ -619,7 +618,6 @@ static int _dpu_kms_initialize_hdmi(struct drm_device *dev, ...@@ -619,7 +618,6 @@ static int _dpu_kms_initialize_hdmi(struct drm_device *dev,
rc = msm_hdmi_modeset_init(priv->hdmi, dev, encoder); rc = msm_hdmi_modeset_init(priv->hdmi, dev, encoder);
if (rc) { if (rc) {
DPU_ERROR("modeset_init failed for DP, rc = %d\n", rc); DPU_ERROR("modeset_init failed for DP, rc = %d\n", rc);
drm_encoder_cleanup(encoder);
return rc; return rc;
} }
...@@ -651,7 +649,6 @@ static int _dpu_kms_initialize_writeback(struct drm_device *dev, ...@@ -651,7 +649,6 @@ static int _dpu_kms_initialize_writeback(struct drm_device *dev,
n_formats); n_formats);
if (rc) { if (rc) {
DPU_ERROR("dpu_writeback_init, rc = %d\n", rc); DPU_ERROR("dpu_writeback_init, rc = %d\n", rc);
drm_encoder_cleanup(encoder);
return rc; return rc;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment