[Intel-gfx] drm/i915: Copy the staged connector config to the legacy atomic state

Ander Conselvan De Oliveira conselvan2 at gmail.com
Fri Mar 27 06:35:21 PDT 2015


On Fri, 2015-03-27 at 16:15 +0300, Dan Carpenter wrote:
> Hello Ander Conselvan de Oliveira,
> 
> The patch 944b0c765757: "drm/i915: Copy the staged connector config
> to the legacy atomic state" from Mar 20, 2015, leads to the following
> Smatch warning:
> 
> 	drivers/gpu/drm/i915/intel_display.c:11937 intel_modeset_stage_output_state()
> 	error: 'connector_state' dereferencing possible ERR_PTR()
> 
> drivers/gpu/drm/i915/intel_display.c
>  11928          /* Now we've also updated encoder->new_crtc for all encoders. */
>  11929          for_each_intel_connector(dev, connector) {
>  11930                  connector_state =
>  11931                          drm_atomic_get_connector_state(state, &connector->base);
>                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> It's complaining that this can return an ERR_PTR.

Yeah, oops, I missed that one. Thanks for reporting.

Cheers,
Ander

>  11932  
>  11933                  if (connector->new_encoder) {
>  11934                          if (connector->new_encoder != connector->encoder)
>  11935                                  connector->encoder = connector->new_encoder;
>  11936                  } else {
>  11937                          connector_state->crtc = NULL;
>  11938                  }
>  11939          }
> 
> 
> regards,
> dan carpenter




More information about the Intel-gfx mailing list