Merge branch 'virtio-gpu-drm-next' of git://git.kraxel.org/linux into drm-next
[deliverable/linux.git] / drivers / gpu / drm / drm_irq.c
index 6f02b4b560b876e9a459031640f699a71142cc66..f9cc68fbd2a3e18b076ad2ced71b8f1ddf002202 100644 (file)
@@ -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;
 
This page took 0.023975 seconds and 5 git commands to generate.