drm/irq: Check for valid VBLANK before dereference
authorThierry Reding <treding@nvidia.com>
Wed, 12 Aug 2015 15:00:30 +0000 (17:00 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 12 Aug 2015 15:39:47 +0000 (17:39 +0200)
When accessing the array of per-CRTC VBLANK structures we must always
check that the index into the array is valid before dereferencing to
avoid crashing.

Signed-off-by: Thierry Reding <treding@nvidia.com>
[danvet: Squash in my own whitespace ocd fixup in drm_vblank_count.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/drm_irq.c

Simple merge