summaryrefslogtreecommitdiffstats
path: root/drivers/edac
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2009-09-05 05:10:31 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-05-10 11:44:59 -0300
commitd88b85072fa7d406f54c30ceeabcd37e5a2ec21a (patch)
treec59cb7a9ab6aff69f0a980f839b96b336569aa9f /drivers/edac
parentc344436319e898784febbeeea71d1b0f65ef53ae (diff)
i7core_edac: Fix a bug when printing error counts with RDIMMs
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/edac')
-rw-r--r--drivers/edac/i7core_edac.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/edac/i7core_edac.c b/drivers/edac/i7core_edac.c
index 2c30493eae0..821e8a1a09c 100644
--- a/drivers/edac/i7core_edac.c
+++ b/drivers/edac/i7core_edac.c
@@ -1054,13 +1054,15 @@ static ssize_t i7core_ce_regs_show(struct mem_ctl_info *mci, char *data)
count = sprintf(data, "data unavailable\n");
return 0;
}
- if (!pvt->is_registered)
+ if (!pvt->is_registered) {
count = sprintf(data, "all channels "
"UDIMM0: %lu UDIMM1: %lu UDIMM2: %lu\n",
pvt->udimm_ce_count[0],
pvt->udimm_ce_count[1],
pvt->udimm_ce_count[2]);
- else
+ data += count;
+ total += count;
+ } else {
for (i = 0; i < NUM_CHANS; i++) {
count = sprintf(data, "channel %d RDIMM0: %lu "
"RDIMM1: %lu RDIMM2: %lu\n",
@@ -1068,9 +1070,10 @@ static ssize_t i7core_ce_regs_show(struct mem_ctl_info *mci, char *data)
pvt->rdimm_ce_count[i][0],
pvt->rdimm_ce_count[i][1],
pvt->rdimm_ce_count[i][2]);
- }
- data += count;
- total += count;
+ data += count;
+ total += count;
+ }
+ }
return total;
}