Skip to content

Commit

Permalink
drm_vblank_get: don't WARN_ON in case vblanks are not initialized
Browse files Browse the repository at this point in the history
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
  • Loading branch information
kraxel committed Jun 2, 2015
1 parent 06b718c commit 16e3247
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/gpu/drm/drm_irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 16e3247

Please sign in to comment.