summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2012-10-30 09:07:58 +0400
committerBen Skeggs <bskeggs@redhat.com>2012-10-31 05:05:33 +0400
commit1249ac592a2f995fef977be33abf077bdb57b3aa (patch)
tree173fdd721f010f31097c6182fd236a24ef1003f2 /drivers
parentcee59f15a60cc6269a25e3f6fbf1a577d6ab8115 (diff)
downloadlinux-1249ac592a2f995fef977be33abf077bdb57b3aa.tar.xz
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/nouveau/core/subdev/i2c/base.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/core/subdev/i2c/base.c b/drivers/gpu/drm/nouveau/core/subdev/i2c/base.c
index 3d2c88310f98..dbfc2abf0cfe 100644
--- a/drivers/gpu/drm/nouveau/core/subdev/i2c/base.c
+++ b/drivers/gpu/drm/nouveau/core/subdev/i2c/base.c
@@ -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;