mirror of
https://github.com/torvalds/linux.git
synced 2024-11-16 09:02:00 +00:00
drm/nouveau/i2c: fix typo when checking nvio i2c port validity
Reported-by: Mathieu Chouquet-Stringer <mathieu@csetco.com> Tested-by: Mathieu Chouquet-Stringer <mathieu@csetco.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
parent
cee59f15a6
commit
1249ac592a
@ -292,7 +292,7 @@ nouveau_i2c_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
|
||||
case DCB_I2C_NVIO_BIT:
|
||||
port->drive = info.drive & 0x0f;
|
||||
if (device->card_type < NV_D0) {
|
||||
if (info.drive >= ARRAY_SIZE(nv50_i2c_port))
|
||||
if (port->drive >= ARRAY_SIZE(nv50_i2c_port))
|
||||
break;
|
||||
port->drive = nv50_i2c_port[port->drive];
|
||||
port->sense = port->drive;
|
||||
|
Loading…
Reference in New Issue
Block a user