aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/edac/i82975x_edac.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/edac/i82975x_edac.c')
-rw-r--r--drivers/edac/i82975x_edac.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/edac/i82975x_edac.c b/drivers/edac/i82975x_edac.c
index 9c346d7f707f..433332c7cdba 100644
--- a/drivers/edac/i82975x_edac.c
+++ b/drivers/edac/i82975x_edac.c
@@ -410,6 +410,9 @@ static void i82975x_init_csrows(struct mem_ctl_info *mci,
410 cumul_size); 410 cumul_size);
411 411
412 nr_pages = cumul_size - last_cumul_size; 412 nr_pages = cumul_size - last_cumul_size;
413 if (!nr_pages)
414 continue;
415
413 /* 416 /*
414 * Initialise dram labels 417 * Initialise dram labels
415 * index values: 418 * index values:
@@ -420,9 +423,6 @@ static void i82975x_init_csrows(struct mem_ctl_info *mci,
420 for (chan = 0; chan < csrow->nr_channels; chan++) { 423 for (chan = 0; chan < csrow->nr_channels; chan++) {
421 dimm = mci->csrows[index].channels[chan].dimm; 424 dimm = mci->csrows[index].channels[chan].dimm;
422 425
423 if (!nr_pages)
424 continue;
425
426 dimm->nr_pages = nr_pages / csrow->nr_channels; 426 dimm->nr_pages = nr_pages / csrow->nr_channels;
427 strncpy(csrow->channels[chan].dimm->label, 427 strncpy(csrow->channels[chan].dimm->label,
428 labels[(index >> 1) + (chan * 2)], 428 labels[(index >> 1) + (chan * 2)],
@@ -433,9 +433,6 @@ static void i82975x_init_csrows(struct mem_ctl_info *mci,
433 dimm->edac_mode = EDAC_SECDED; /* only supported */ 433 dimm->edac_mode = EDAC_SECDED; /* only supported */
434 } 434 }
435 435
436 if (!nr_pages)
437 continue; /* not populated */
438
439 csrow->first_page = last_cumul_size; 436 csrow->first_page = last_cumul_size;
440 csrow->last_page = cumul_size - 1; 437 csrow->last_page = cumul_size - 1;
441 last_cumul_size = cumul_size; 438 last_cumul_size = cumul_size;