diff options
author | Adrian Bunk <bunk@kernel.org> | 2008-03-12 14:15:00 +0100 |
---|---|---|
committer | Jean Delvare <khali@hyperion.delvare> | 2008-03-12 14:15:00 +0100 |
commit | 5edc68b8530ff1b3133d057350da98c93cca5a82 (patch) | |
tree | 4df5af586cbbda22c0e67965f9c007bf2cf88c36 /drivers | |
parent | baadac8b10c5ac15ce3d26b68fa266c8889b163f (diff) | |
download | linux-5edc68b8530ff1b3133d057350da98c93cca5a82.tar.bz2 |
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')
-rw-r--r-- | drivers/i2c/busses/i2c-amd756.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/busses/i2c-amd756.c b/drivers/i2c/busses/i2c-amd756.c index 573abe440842..2fa43183d375 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) { |