提交 926311fd 编写于 作者: R Roel Kluin 提交者: Borislav Petkov

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: NRoel Kluin <roel.kluin@gmail.com>
Signed-off-by: NBorislav Petkov <borislav.petkov@amd.com>
上级 7284ce6c
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册