drm/i915/dsi: Dont forget to clean up the connector on error (v2)
authorVivek Kasireddy <vivek.kasireddy@intel.com>
Fri, 22 May 2020 20:26:30 +0000 (13:26 -0700)
committerJosé Roberto de Souza <jose.souza@intel.com>
Tue, 2 Jun 2020 15:34:57 +0000 (08:34 -0700)
If an error is encountered during the DSI initialization setup, the
drm connector object also needs to be cleaned up along with the encoder.
The error can happen due to a missing mode in the VBT or for other
reasons.

v2: Rephrase the commit message to make it more clear.

Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Vandita Kulkarni <vandita.kulkarni@intel.com>
Signed-off-by: Vivek Kasireddy <vivek.kasireddy@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200522202630.7604-1-vivek.kasireddy@intel.com
drivers/gpu/drm/i915/display/icl_dsi.c

index 25200f289e6eab12b48716cd87ba95304a28be73..8c55f5bee9ab6a71f8d8b376d5c5cdb88efe34d9 100644 (file)
@@ -1949,6 +1949,7 @@ void icl_dsi_init(struct drm_i915_private *dev_priv)
        return;
 
 err:
+       drm_connector_cleanup(connector);
        drm_encoder_cleanup(&encoder->base);
        kfree(intel_dsi);
        kfree(intel_connector);