mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-07-04 00:03:25 -04:00
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
1 changed files with 3 additions and 0 deletions
|
@ -1056,6 +1056,9 @@ int drm_vblank_get(struct drm_device *dev, int crtc)
|
||||||
unsigned long irqflags;
|
unsigned long irqflags;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
|
if (!dev->num_crtcs)
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
if (WARN_ON(crtc >= dev->num_crtcs))
|
if (WARN_ON(crtc >= dev->num_crtcs))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue