summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2009-08-05 19:28:27 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-05-10 11:44:55 -0300
commit2068def56c09f2b24e6de04a1b84757a0fb07947 (patch)
treedbbf7aa7a9abf419bda793af5b3708178d1e1fbc
parent276b824c3095b09e8cb76f5709f56e9c6818ae85 (diff)
downloadlinux-2068def56c09f2b24e6de04a1b84757a0fb07947.tar.bz2
i7core_edac: fix error codes for sysfs error injection interface
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/edac/i7core_edac.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/edac/i7core_edac.c b/drivers/edac/i7core_edac.c
index 72859e87aeb2..ab9d26ec19d7 100644
--- a/drivers/edac/i7core_edac.c
+++ b/drivers/edac/i7core_edac.c
@@ -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;
@@ -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;
@@ -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;
@@ -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;