drm_vblank_get: don't WARN_ON in case vblanks are not initialized
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
06b718c012
commit
16e3247da7
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue