drm/i915: Silence compiler warning
authorAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Fri, 29 May 2015 11:28:09 +0000 (14:28 +0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 29 May 2015 17:06:24 +0000 (19:06 +0200)
commitbd4b4827acdc00bf9e71f939d160102021d10d4f
tree4bfecc0b57a1753bd324cabdcced85b86bcda1d1
parent475c2e3b3cfba9283793d56742dc2cae2712574b
drm/i915: Silence compiler warning

Silence the following -Wmaybe-uninitialized warnings and make the code
more clear.

drivers/gpu/drm/i915/intel_display.c: In function ‘__intel_set_mode’:
drivers/gpu/drm/i915/intel_display.c:11844:14: warning: ‘crtc_state’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  return state->mode_changed || state->active_changed;
              ^
drivers/gpu/drm/i915/intel_display.c:11854:25: note: ‘crtc_state’ was declared here
  struct drm_crtc_state *crtc_state;
                         ^
drivers/gpu/drm/i915/intel_display.c:11868:6: warning: ‘crtc’ may be used uninitialized in this function [-Wmaybe-uninitialized]
   if (crtc != intel_encoder->base.crtc)
      ^
drivers/gpu/drm/i915/intel_display.c:11853:19: note: ‘crtc’ was declared here
  struct drm_crtc *crtc;

Reported-by: Chris Wilson <chris@chris-wilson.co.uk>
Suggested-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_display.c