Commit 9ec85c03 authored by Adrian Bunk's avatar Adrian Bunk Committed by 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: default avatarAdrian Bunk <bunk@stusta.de>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 358dd55a
...@@ -3400,7 +3400,7 @@ static int __devinit atyfb_pci_probe(struct pci_dev *pdev, const struct pci_devi ...@@ -3400,7 +3400,7 @@ static int __devinit atyfb_pci_probe(struct pci_dev *pdev, const struct pci_devi
struct atyfb_par *par; struct atyfb_par *par;
int i, rc = -ENOMEM; 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) if (pdev->device == aty_chips[i].pci_id)
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment