提交 5edc68b8 编写于 作者: A Adrian Bunk 提交者: Jean Delvare

i2c-amd756: Fix off-by-one

This patch fixes an off-by-one error spotted by the Coverity checker.
Signed-off-by: NAdrian Bunk <bunk@kernel.org>
Signed-off-by: NJean Delvare <khali@linux-fr.org>
上级 baadac8b
......@@ -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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册