From: Adrian Bunk Date: Tue, 11 Apr 2006 05:55:45 +0000 (-0700) Subject: [PATCH] video/aty/atyfb_base.c: fix an off-by-one error X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9ec85c03d045d5ec24d6f15649a68646aefe88ba;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git [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 Cc: "Antonino A. Daplas" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/video/aty/atyfb_base.c b/drivers/video/aty/atyfb_base.c index b39e72d5413b..d9d7d3c4cae2 100644 --- a/drivers/video/aty/atyfb_base.c +++ b/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;