]> git.karo-electronics.de Git - linux-beck.git/commitdiff
sb_edac: Fix off-by-one error in number of channels
authorJim Snow <jim.m.snow@intel.com>
Tue, 18 Nov 2014 13:51:08 +0000 (14:51 +0100)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Tue, 2 Dec 2014 14:06:51 +0000 (12:06 -0200)
This prevented edac sysfs code from properly handling 6 channels
per memory controller.

Signed-off-by: Jim Snow <jim.snow@intel.com>
Signed-off-by: Lukasz Anaczkowski <lukasz.anaczkowski@intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/edac/edac_mc_sysfs.c

index a6cd36100663278dccae072e724bcc0c71c51794..670d2829c54768b9484fe5d982b4634e5b407665 100644 (file)
@@ -372,7 +372,7 @@ static int edac_create_csrow_object(struct mem_ctl_info *mci,
 {
        int err, chan;
 
-       if (csrow->nr_channels >= EDAC_NR_CHANNELS)
+       if (csrow->nr_channels > EDAC_NR_CHANNELS)
                return -ENODEV;
 
        csrow->dev.type = &csrow_attr_type;