Commit 1249ac59 authored by Ben Skeggs's avatar Ben Skeggs

drm/nouveau/i2c: fix typo when checking nvio i2c port validity

Reported-by: default avatarMathieu Chouquet-Stringer <mathieu@csetco.com>
Tested-by: default avatarMathieu Chouquet-Stringer <mathieu@csetco.com>
Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent cee59f15
...@@ -292,7 +292,7 @@ nouveau_i2c_ctor(struct nouveau_object *parent, struct nouveau_object *engine, ...@@ -292,7 +292,7 @@ nouveau_i2c_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
case DCB_I2C_NVIO_BIT: case DCB_I2C_NVIO_BIT:
port->drive = info.drive & 0x0f; port->drive = info.drive & 0x0f;
if (device->card_type < NV_D0) { if (device->card_type < NV_D0) {
if (info.drive >= ARRAY_SIZE(nv50_i2c_port)) if (port->drive >= ARRAY_SIZE(nv50_i2c_port))
break; break;
port->drive = nv50_i2c_port[port->drive]; port->drive = nv50_i2c_port[port->drive];
port->sense = port->drive; port->sense = port->drive;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment