aboutsummaryrefslogtreecommitdiff
path: root/drivers/i2c/busses/i2c-amd756.c
diff options
context:
space:
mode:
authorAdrian Bunk <bunk@kernel.org>2008-03-12 14:15:00 +0100
committerJean Delvare <khali@hyperion.delvare>2008-03-12 14:15:00 +0100
commit5edc68b8530ff1b3133d057350da98c93cca5a82 (patch)
tree4df5af586cbbda22c0e67965f9c007bf2cf88c36 /drivers/i2c/busses/i2c-amd756.c
parentbaadac8b10c5ac15ce3d26b68fa266c8889b163f (diff)
i2c-amd756: Fix off-by-one
This patch fixes an off-by-one error spotted by the Coverity checker. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Jean Delvare <khali@linux-fr.org>
Diffstat (limited to 'drivers/i2c/busses/i2c-amd756.c')
-rw-r--r--drivers/i2c/busses/i2c-amd756.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/busses/i2c-amd756.c b/drivers/i2c/busses/i2c-amd756.c
index 573abe44084..2fa43183d37 100644
--- a/drivers/i2c/busses/i2c-amd756.c
+++ b/drivers/i2c/busses/i2c-amd756.c
@@ -335,7 +335,7 @@ static int __devinit amd756_probe(struct pci_dev *pdev,
u8 temp;
/* driver_data might come from user-space, so check it */
- if (id->driver_data > ARRAY_SIZE(chipname))
+ if (id->driver_data >= ARRAY_SIZE(chipname))
return -EINVAL;
if (amd756_ioport) {