summaryrefslogtreecommitdiff
path: root/linux-core/drm_irq.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux-core/drm_irq.c')
-rw-r--r--linux-core/drm_irq.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/linux-core/drm_irq.c b/linux-core/drm_irq.c
index f673a97c..c9d1c0d2 100644
--- a/linux-core/drm_irq.c
+++ b/linux-core/drm_irq.c
@@ -405,7 +405,7 @@ int drm_modeset_ctl(DRM_IOCTL_ARGS)
}
crtc = modeset.arg;
- if (crtc > dev->num_crtcs) {
+ if (crtc >= dev->num_crtcs) {
ret = -EINVAL;
goto out;
}
@@ -474,8 +474,7 @@ int drm_wait_vblank(DRM_IOCTL_ARGS)
flags = vblwait.request.type & _DRM_VBLANK_FLAGS_MASK;
crtc = flags & _DRM_VBLANK_SECONDARY ? 1 : 0;
- if (!drm_core_check_feature(dev, (flags & _DRM_VBLANK_SECONDARY) ?
- DRIVER_IRQ_VBL2 : DRIVER_IRQ_VBL))
+ if (crtc >= dev->num_crtcs)
return -EINVAL;
drm_update_vblank_count(dev, crtc);