Re: [PATCH 4/4] drm/i915/dsi: Call drm_connector_cleanup on vlv_dsi_init error exit path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Dec 01, 2018 at 12:31:48PM +0100, Hans de Goede wrote:
> 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.
> 
> Signed-off-by: Hans de Goede <hdegoede@xxxxxxxxxx>

Reviewed-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>

> ---
>  drivers/gpu/drm/i915/vlv_dsi.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/vlv_dsi.c b/drivers/gpu/drm/i915/vlv_dsi.c
> index d72ccf557a9c..7ca5aafcdf93 100644
> --- a/drivers/gpu/drm/i915/vlv_dsi.c
> +++ b/drivers/gpu/drm/i915/vlv_dsi.c
> @@ -1861,7 +1861,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;
>  	}
>  
>  	connector->display_info.width_mm = fixed_mode->width_mm;
> @@ -1874,6 +1874,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);
> -- 
> 2.19.1

-- 
Ville Syrjälä
Intel
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux