[Intel-gfx] [PATCH] drm/i915/tc: Delete bogus NULL check in intel_ddi_encoder_destroy()

Ville Syrjälä ville.syrjala at linux.intel.com
Tue Oct 5 19:26:55 UTC 2021


On Mon, Oct 04, 2021 at 01:37:37PM +0300, Dan Carpenter wrote:
> The "digi_port" pointer can't be NULL and we have already dereferenced
> it so checking for NULL is not necessary.  Delete the check.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter at oracle.com>

Thanks. Applied to drm-intel-next.

> ---
>  drivers/gpu/drm/i915/display/intel_ddi.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c
> index 51d07e9af9f3..b9c6eb13804f 100644
> --- a/drivers/gpu/drm/i915/display/intel_ddi.c
> +++ b/drivers/gpu/drm/i915/display/intel_ddi.c
> @@ -4025,8 +4025,7 @@ static void intel_ddi_encoder_destroy(struct drm_encoder *encoder)
>  	intel_display_power_flush_work(i915);
>  
>  	drm_encoder_cleanup(encoder);
> -	if (dig_port)
> -		kfree(dig_port->hdcp_port_data.streams);
> +	kfree(dig_port->hdcp_port_data.streams);
>  	kfree(dig_port);
>  }
>  
> -- 
> 2.20.1

-- 
Ville Syrjälä
Intel


More information about the Intel-gfx mailing list