[Intel-gfx] [PATCH] drm/i915: Handle error to get connector state when staging config
Daniel Vetter
daniel at ffwll.ch
Fri Mar 27 07:07:22 PDT 2015
On Fri, Mar 27, 2015 at 03:33:51PM +0200, Ander Conselvan de Oliveira wrote:
> The return value of one of the calls to drm_atomic_get_connector_state()
> in intel_modeset_stage_output_state() wasn't checked for errors.
>
> Reported-by: Dan Carpenter <dan.carpenter at oracle.com>
> Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira at intel.com>
Queued for -next, thanks for the patch.
-Daniel
> ---
> drivers/gpu/drm/i915/intel_display.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 68fe8b8..1329ed2 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -12000,6 +12000,8 @@ intel_modeset_stage_output_state(struct drm_device *dev,
> for_each_intel_connector(dev, connector) {
> connector_state =
> drm_atomic_get_connector_state(state, &connector->base);
> + if (IS_ERR(connector_state))
> + return PTR_ERR(connector_state);
>
> if (connector->new_encoder) {
> if (connector->new_encoder != connector->encoder)
> --
> 2.1.0
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
More information about the Intel-gfx
mailing list