Messages in this thread Patch in this message | | | From | Mauro Carvalho Chehab <> | Subject | [PATCH RFCv2 06/16] edac_mc_sysfs: Fix error handling | Date | Sat, 28 Jan 2012 13:32:41 -0200 |
| |
Check for the current csrow's nr_pages, and not for the last csrow's nr_pages.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> --- drivers/edac/edac_mc_sysfs.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/edac/edac_mc_sysfs.c b/drivers/edac/edac_mc_sysfs.c index fed653a..a439bed 100644 --- a/drivers/edac/edac_mc_sysfs.c +++ b/drivers/edac/edac_mc_sysfs.c @@ -957,7 +957,7 @@ int edac_create_sysfs_mci_device(struct mem_ctl_info *mci) /* CSROW error: backout what has already been registered, */ fail1: for (i--; i >= 0; i--) { - if (csrow->nr_pages > 0) { + if (mci->csrows[i].nr_pages > 0) { kobject_put(&mci->csrows[i].kobj); } } -- 1.7.8
| |