Skip to content

Commit

Permalink
[PATCH] video/aty/atyfb_base.c: fix an off-by-one error
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Adrian Bunk authored and Linus Torvalds committed Apr 11, 2006
1 parent 358dd55 commit 9ec85c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/video/aty/atyfb_base.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 9ec85c0

Please sign in to comment.