diff options
author | Roel Kluin <roel.kluin@gmail.com> | 2010-01-11 14:58:21 -0500 |
---|---|---|
committer | Borislav Petkov <borislav.petkov@amd.com> | 2010-01-15 04:45:58 -0500 |
commit | 926311fd7dabcd284a1e8a87a3e2bb5f929c0c60 (patch) | |
tree | 359f6f98944e3ec6870aa6f0bb9a9cef43872005 /drivers/edac/amd64_edac.c | |
parent | 7284ce6c9f6153d1777df5f310c959724d1bd446 (diff) |
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 <roel.kluin@gmail.com>
Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
Diffstat (limited to 'drivers/edac/amd64_edac.c')
-rw-r--r-- | drivers/edac/amd64_edac.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c index c5facd951dda..000dc67b85b7 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) | |||
197 | edac_printk(KERN_DEBUG, EDAC_MC, | 197 | edac_printk(KERN_DEBUG, EDAC_MC, |
198 | "pci-read, sdram scrub control value: %d \n", scrubval); | 198 | "pci-read, sdram scrub control value: %d \n", scrubval); |
199 | 199 | ||
200 | for (i = 0; ARRAY_SIZE(scrubrates); i++) { | 200 | for (i = 0; i < ARRAY_SIZE(scrubrates); i++) { |
201 | if (scrubrates[i].scrubval == scrubval) { | 201 | if (scrubrates[i].scrubval == scrubval) { |
202 | *bw = scrubrates[i].bandwidth; | 202 | *bw = scrubrates[i].bandwidth; |
203 | status = 0; | 203 | status = 0; |