diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2013-09-27 23:17:14 +0300 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2013-11-08 15:36:02 +1000 |
commit | ca3562226a901ddf77c7da36077c25316c4c0bb7 (patch) | |
tree | 21907defb5c90cd19d00e5e33d5268cda2fff5b8 /drivers/gpu | |
parent | 1934a2add96bdd9922c6752b07244cbd11d6a7d7 (diff) | |
download | talos-op-linux-ca3562226a901ddf77c7da36077c25316c4c0bb7.tar.gz talos-op-linux-ca3562226a901ddf77c7da36077c25316c4c0bb7.zip |
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>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_drm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c index 428d818be775..20626b93130c 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drm.c +++ b/drivers/gpu/drm/nouveau/nouveau_drm.c @@ -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; |