[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:
parent
358dd55aa3
commit
9ec85c03d0
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue