drm/nouveau: off by one in nouveau_drm_vblank_enable()
The test here should be ">= ARRAY_SIZE()" instead of "> ARRAY_SIZE()". Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
parent
1934a2add9
commit
ca3562226a
1 changed files with 1 additions and 1 deletions
|
@ -93,7 +93,7 @@ nouveau_drm_vblank_enable(struct drm_device *dev, int head)
|
|||
struct nouveau_drm *drm = nouveau_drm(dev);
|
||||
struct nouveau_disp *pdisp = nouveau_disp(drm->device);
|
||||
|
||||
if (WARN_ON_ONCE(head > ARRAY_SIZE(drm->vblank)))
|
||||
if (WARN_ON_ONCE(head >= ARRAY_SIZE(drm->vblank)))
|
||||
return -EIO;
|
||||
WARN_ON_ONCE(drm->vblank[head].func);
|
||||
drm->vblank[head].func = nouveau_drm_vblank_handler;
|
||||
|
|
Loading…
Reference in a new issue