aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/edac
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2013-02-15 05:51:25 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-02-21 09:06:35 -0500
commit3d958823e26979a73d73c0343041d64813702a5b (patch)
treee34f52c9cbd61ae355472a280ac7039606ba5d34 /drivers/edac
parent59b9796d1e0e5edb6eb3d5ae550eac0d53d27adb (diff)
edac: better report error conditions in debug mode
It is hard to find what's wrong without a proper error report. Improve it, in debug mode. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/edac')
-rw-r--r--drivers/edac/edac_mc_sysfs.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/edac/edac_mc_sysfs.c b/drivers/edac/edac_mc_sysfs.c
index 963a91edb259..4f4b6137d74e 100644
--- a/drivers/edac/edac_mc_sysfs.c
+++ b/drivers/edac/edac_mc_sysfs.c
@@ -429,8 +429,12 @@ static int edac_create_csrow_objects(struct mem_ctl_info *mci)
429 if (!nr_pages_per_csrow(csrow)) 429 if (!nr_pages_per_csrow(csrow))
430 continue; 430 continue;
431 err = edac_create_csrow_object(mci, mci->csrows[i], i); 431 err = edac_create_csrow_object(mci, mci->csrows[i], i);
432 if (err < 0) 432 if (err < 0) {
433 edac_dbg(1,
434 "failure: create csrow objects for csrow %d\n",
435 i);
433 goto error; 436 goto error;
437 }
434 } 438 }
435 return 0; 439 return 0;
436 440
@@ -999,6 +1003,7 @@ int edac_create_sysfs_mci_device(struct mem_ctl_info *mci)
999 edac_dbg(0, "creating device %s\n", dev_name(&mci->dev)); 1003 edac_dbg(0, "creating device %s\n", dev_name(&mci->dev));
1000 err = device_add(&mci->dev); 1004 err = device_add(&mci->dev);
1001 if (err < 0) { 1005 if (err < 0) {
1006 edac_dbg(1, "failure: create device %s\n", dev_name(&mci->dev));
1002 bus_unregister(&mci->bus); 1007 bus_unregister(&mci->bus);
1003 kfree(mci->bus.name); 1008 kfree(mci->bus.name);
1004 return err; 1009 return err;