[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: Adrian Bunk <bunk@stusta.de>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
Adrian Bunk 2006-04-10 22:55:45 -07:00 committed by Linus Torvalds
parent 358dd55aa3
commit 9ec85c03d0
1 changed files with 1 additions and 1 deletions

View File

@ -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;