aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_irq.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2015-06-04 09:36:39 +1000
committerDave Airlie <airlied@redhat.com>2015-06-04 09:36:39 +1000
commit63e1456122761745082d325329ccce749a426059 (patch)
treeab23814f68ab4af1a45c7e9631561b2a1b01b430 /drivers/gpu/drm/drm_irq.c
parentMerge branch 'linux-4.1.0-rc5-tilcdc-refactor' of https://github.com/jsarha/linux into drm-next (diff)
parentAdd MAINTAINERS entry for virtio-gpu. (diff)
downloadlinux-dev-63e1456122761745082d325329ccce749a426059.tar.xz
linux-dev-63e1456122761745082d325329ccce749a426059.zip
Merge branch 'virtio-gpu-drm-next' of git://git.kraxel.org/linux into drm-next
Yay, thanks to Gerd for pull this together. * 'virtio-gpu-drm-next' of git://git.kraxel.org/linux: Add MAINTAINERS entry for virtio-gpu. Add virtio gpu driver. drm_vblank_get: don't WARN_ON in case vblanks are not initialized break kconfig dependency loop
Diffstat (limited to 'drivers/gpu/drm/drm_irq.c')
-rw-r--r--drivers/gpu/drm/drm_irq.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c
index 6f02b4b560b8..f9cc68fbd2a3 100644
--- a/drivers/gpu/drm/drm_irq.c
+++ b/drivers/gpu/drm/drm_irq.c
@@ -1056,6 +1056,9 @@ int drm_vblank_get(struct drm_device *dev, int crtc)
unsigned long irqflags;
int ret = 0;
+ if (!dev->num_crtcs)
+ return -EINVAL;
+
if (WARN_ON(crtc >= dev->num_crtcs))
return -EINVAL;