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)
commit7d1de851632d013023cd7c89eb8664f62e5beb2c
treed162a424ad975352f7005bd33b084ad7acae19fa
parent2a7d3d6d5ddbd202c09f228829cd03609a8efb23
drm/irq: Check for valid VBLANK before dereference

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