drm/i915: Check for NULL atomic state in intel_crtc_disable_noatomic()
authorAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Fri, 20 Jan 2017 14:28:45 +0000 (16:28 +0200)
committerJani Nikula <jani.nikula@intel.com>
Wed, 25 Jan 2017 10:42:50 +0000 (12:42 +0200)
commit6d1d427a4e24c403b4adf928d61994bdaa0ca03a
tree5c33ee9076e10ee4258fd3049c56f4d431e5dc33
parent3781bd6e7d64d5f5bea9fdee11ab9460a700c0e4
drm/i915: Check for NULL atomic state in intel_crtc_disable_noatomic()

In intel_crtc_disable_noatomic(), bail on a failure to allocate an
atomic state to avoid a NULL pointer dereference.

Fixes: 4a80655827af ("drm/i915: Pass atomic state to crtc enable/disable functions")
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Daniel Vetter <daniel.vetter@intel.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Cc: <stable@vger.kernel.org> # v4.9+
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1484922525-6131-4-git-send-email-ander.conselvan.de.oliveira@intel.com
(cherry picked from commit 31bb2ef97ea9db343348f9b5ccaa9bb6f48fc655)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/intel_display.c