diff options
author | Marcin Slusarz <marcin.slusarz@gmail.com> | 2010-02-17 21:04:01 +0300 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2010-02-25 08:09:09 +0300 |
commit | b762b8ce53da7c7a7a4d660878887681c86be61b (patch) | |
tree | 8653890cb4e59a200244878a35c52532f238f287 /drivers/gpu/drm/nouveau/nouveau_i2c.c | |
parent | df31ef4dbd48eca2772d8d88b12ee5eb5117c86e (diff) | |
download | linux-b762b8ce53da7c7a7a4d660878887681c86be61b.tar.xz |
drm/nouveau: fix nouveau_i2c_find bounds checking
Reported-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_i2c.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_i2c.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_i2c.c b/drivers/gpu/drm/nouveau/nouveau_i2c.c index 70e994d28122..f0162c4a6b90 100644 --- a/drivers/gpu/drm/nouveau/nouveau_i2c.c +++ b/drivers/gpu/drm/nouveau/nouveau_i2c.c @@ -256,7 +256,7 @@ nouveau_i2c_find(struct drm_device *dev, int index) struct drm_nouveau_private *dev_priv = dev->dev_private; struct nvbios *bios = &dev_priv->VBIOS; - if (index > DCB_MAX_NUM_I2C_ENTRIES) + if (index >= DCB_MAX_NUM_I2C_ENTRIES) return NULL; if (!bios->bdcb.dcb.i2c[index].chan) { |