lkml.org 
[lkml]   [2006]   [Apr]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[2.6 patch] video/aty/atyfb_base.c: fix an off-by-one error
This patch fixes an obvious of-by-one error spotted by the Coverity 
checker.

Signed-off-by: Adrian Bunk <bunk@stusta.de>

--- linux-2.6.17-rc1-mm1-full/drivers/video/aty/atyfb_base.c.old 2006-04-04 20:20:18.000000000 +0200
+++ linux-2.6.17-rc1-mm1-full/drivers/video/aty/atyfb_base.c 2006-04-04 20:20:33.000000000 +0200
@@ -3400,7 +3400,7 @@ static int __devinit atyfb_pci_probe(str
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;

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-04-04 20:57    [W:0.047 / U:0.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site