Skip to content

Commit

Permalink
drm/i915/dsi: Call drm_connector_cleanup on vlv_dsi_init error exit path
Browse files Browse the repository at this point in the history
If we exit vlv_dsi_init() because we failed to find a fixed_mode, then
we've already called drm_connector_init() and we should call
drm_connector_cleanup() to unregister the connector object.

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190524163518.17545-1-hdegoede@redhat.com
  • Loading branch information
Hans de Goede committed May 27, 2019
1 parent c0a74c7 commit 5c27de1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/gpu/drm/i915/vlv_dsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1793,7 +1793,7 @@ void vlv_dsi_init(struct drm_i915_private *dev_priv)

if (!fixed_mode) {
DRM_DEBUG_KMS("no fixed mode\n");
goto err;
goto err_cleanup_connector;
}

intel_panel_init(&intel_connector->panel, fixed_mode, NULL);
Expand All @@ -1803,6 +1803,8 @@ void vlv_dsi_init(struct drm_i915_private *dev_priv)

return;

err_cleanup_connector:
drm_connector_cleanup(&intel_connector->base);
err:
drm_encoder_cleanup(&intel_encoder->base);
kfree(intel_dsi);
Expand Down

0 comments on commit 5c27de1

Please sign in to comment.