提交 3d958823 编写于 作者: M Mauro Carvalho Chehab

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: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 59b9796d
...@@ -429,8 +429,12 @@ static int edac_create_csrow_objects(struct mem_ctl_info *mci) ...@@ -429,8 +429,12 @@ static int edac_create_csrow_objects(struct mem_ctl_info *mci)
if (!nr_pages_per_csrow(csrow)) if (!nr_pages_per_csrow(csrow))
continue; continue;
err = edac_create_csrow_object(mci, mci->csrows[i], i); err = edac_create_csrow_object(mci, mci->csrows[i], i);
if (err < 0) if (err < 0) {
edac_dbg(1,
"failure: create csrow objects for csrow %d\n",
i);
goto error; goto error;
}
} }
return 0; return 0;
...@@ -999,6 +1003,7 @@ int edac_create_sysfs_mci_device(struct mem_ctl_info *mci) ...@@ -999,6 +1003,7 @@ int edac_create_sysfs_mci_device(struct mem_ctl_info *mci)
edac_dbg(0, "creating device %s\n", dev_name(&mci->dev)); edac_dbg(0, "creating device %s\n", dev_name(&mci->dev));
err = device_add(&mci->dev); err = device_add(&mci->dev);
if (err < 0) { if (err < 0) {
edac_dbg(1, "failure: create device %s\n", dev_name(&mci->dev));
bus_unregister(&mci->bus); bus_unregister(&mci->bus);
kfree(mci->bus.name); kfree(mci->bus.name);
return err; return err;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册