Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5edc68b8 authored by Adrian Bunk's avatar Adrian Bunk Committed by Jean Delvare
Browse files

i2c-amd756: Fix off-by-one



This patch fixes an off-by-one error spotted by the Coverity checker.

Signed-off-by: default avatarAdrian Bunk <bunk@kernel.org>
Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
parent baadac8b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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) {