mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
drm/nouveau: fix nouveau_i2c_find bounds checking
Reported-by: Dan Carpenter <[email protected]> Signed-off-by: Marcin Slusarz <[email protected]> Signed-off-by: Francisco Jerez <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
This commit is contained in:
parent
df31ef4dbd
commit
b762b8ce53
1 changed files with 1 additions and 1 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue