From: Roel Kluin Date: Mon, 11 Jan 2010 19:58:21 +0000 (+0100) Subject: amd64_edac: Ensure index stays within bounds in amd64_get_scrub_rate X-Git-Tag: v2.6.33-rc5~64^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=926311fd7dabcd284a1e8a87a3e2bb5f929c0c60;p=profile%2Fcommon%2Fkernel-common.git amd64_edac: Ensure index stays within bounds in amd64_get_scrub_rate Add a missing iterator variable thus fixing the conditional of the for-loop in amd64_get_scrub_rate(). Signed-off-by: Roel Kluin Signed-off-by: Borislav Petkov --- diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c index c5facd9..000dc67 100644 --- a/drivers/edac/amd64_edac.c +++ b/drivers/edac/amd64_edac.c @@ -197,7 +197,7 @@ static int amd64_get_scrub_rate(struct mem_ctl_info *mci, u32 *bw) edac_printk(KERN_DEBUG, EDAC_MC, "pci-read, sdram scrub control value: %d \n", scrubval); - for (i = 0; ARRAY_SIZE(scrubrates); i++) { + for (i = 0; i < ARRAY_SIZE(scrubrates); i++) { if (scrubrates[i].scrubval == scrubval) { *bw = scrubrates[i].bandwidth; status = 0;