Skip to content

Commit

Permalink
i7core_edac: fix error codes for sysfs error injection interface
Browse files Browse the repository at this point in the history
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Mauro Carvalho Chehab committed May 10, 2010
1 parent 276b824 commit 2068def
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/edac/i7core_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@ static ssize_t i7core_inject_socket_store(struct mem_ctl_info *mci,

rc = strict_strtoul(data, 10, &value);
if ((rc < 0) || (value >= pvt->sockets))
return 0;
return -EIO;

pvt->inject.section = (u32) value;
return count;
Expand Down Expand Up @@ -676,7 +676,7 @@ static ssize_t i7core_inject_section_store(struct mem_ctl_info *mci,

rc = strict_strtoul(data, 10, &value);
if ((rc < 0) || (value > 3))
return 0;
return -EIO;

pvt->inject.section = (u32) value;
return count;
Expand Down Expand Up @@ -709,7 +709,7 @@ static ssize_t i7core_inject_type_store(struct mem_ctl_info *mci,

rc = strict_strtoul(data, 10, &value);
if ((rc < 0) || (value > 7))
return 0;
return -EIO;

pvt->inject.type = (u32) value;
return count;
Expand Down Expand Up @@ -744,7 +744,7 @@ static ssize_t i7core_inject_eccmask_store(struct mem_ctl_info *mci,

rc = strict_strtoul(data, 10, &value);
if (rc < 0)
return 0;
return -EIO;

pvt->inject.eccmask = (u32) value;
return count;
Expand Down

0 comments on commit 2068def

Please sign in to comment.