提交 9ec85c03 编写于 作者: A Adrian Bunk 提交者: Linus Torvalds

[PATCH] video/aty/atyfb_base.c: fix an off-by-one error

Fix an obvious of-by-one error spotted by the Coverity checker.
Signed-off-by: NAdrian Bunk <bunk@stusta.de>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 358dd55a
......@@ -3400,7 +3400,7 @@ static int __devinit atyfb_pci_probe(struct pci_dev *pdev, const struct pci_devi
struct atyfb_par *par;
int i, rc = -ENOMEM;
for (i = ARRAY_SIZE(aty_chips); i >= 0; i--)
for (i = ARRAY_SIZE(aty_chips) - 1; i >= 0; i--)
if (pdev->device == aty_chips[i].pci_id)
break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册