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>
This commit is contained in:
Adrian Bunk 2008-03-12 14:15:00 +01:00 committed by Jean Delvare
parent baadac8b10
commit 5edc68b853

View File

@ -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) {