lkml.org 
[lkml]   [2012]   [Jan]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH RFCv2 06/16] edac_mc_sysfs: Fix error handling
    Date
    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


    \
     
     \ /
      Last update: 2012-01-28 16:37    [W:3.801 / U:0.084 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site