i7core_edac: fix error codes for sysfs error injection interface
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
diff --git a/drivers/edac/i7core_edac.c b/drivers/edac/i7core_edac.c
index 72859e8..ab9d26e 100644
--- a/drivers/edac/i7core_edac.c
+++ b/drivers/edac/i7core_edac.c
@@ -644,7 +644,7 @@
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 @@
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 @@
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 @@
rc = strict_strtoul(data, 10, &value);
if (rc < 0)
- return 0;
+ return -EIO;
pvt->inject.eccmask = (u32) value;
return count;