提交 16e3247d 编写于 作者: G Gerd Hoffmann

drm_vblank_get: don't WARN_ON in case vblanks are not initialized

Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
Reviewed-by: NAlex Deucher <alexander.deucher@amd.com>
上级 06b718c0
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册