Skip to content

Commit

Permalink
sb_edac: Fix off-by-one error in number of channels
Browse files Browse the repository at this point in the history
This prevented edac sysfs code from properly handling 6 channels
per memory controller.

Signed-off-by: Jim Snow <[email protected]>
Signed-off-by: Lukasz Anaczkowski <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
  • Loading branch information
jimsnow-intel authored and mchehab committed Dec 2, 2014
1 parent 009d043 commit 50043e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/edac/edac_mc_sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 50043e2

Please sign in to comment.