mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-15 15:04:27 +08:00
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>
This commit is contained in:
parent
7284ce6c9f
commit
926311fd7d
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user