Browse Source

[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>
Adrian Bunk 19 years ago
parent
commit
9ec85c03d0
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/video/aty/atyfb_base.c

+ 1 - 1
drivers/video/aty/atyfb_base.c

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