summaryrefslogtreecommitdiffstats
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
parent6aa627250354c73ec705040b3a327b2915756fac (diff)
parent4ad6ee91aa9f730136eccc02dfc1df4ad56baa57 (diff)
downloadtalos-op-linux-63e1456122761745082d325329ccce749a426059.tar.gz
talos-op-linux-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;
OpenPOWER on IntegriCloud