diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-08-05 18:28:27 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-05-10 10:44:55 -0400 |
commit | 2068def56c09f2b24e6de04a1b84757a0fb07947 (patch) | |
tree | dbbf7aa7a9abf419bda793af5b3708178d1e1fbc /drivers/edac | |
parent | 276b824c3095b09e8cb76f5709f56e9c6818ae85 (diff) |
i7core_edac: fix error codes for sysfs error injection interface
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/edac')
-rw-r--r-- | drivers/edac/i7core_edac.c | 8 |
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, | |||
644 | 644 | ||
645 | rc = strict_strtoul(data, 10, &value); | 645 | rc = strict_strtoul(data, 10, &value); |
646 | if ((rc < 0) || (value >= pvt->sockets)) | 646 | if ((rc < 0) || (value >= pvt->sockets)) |
647 | return 0; | 647 | return -EIO; |
648 | 648 | ||
649 | pvt->inject.section = (u32) value; | 649 | pvt->inject.section = (u32) value; |
650 | return count; | 650 | return count; |
@@ -676,7 +676,7 @@ static ssize_t i7core_inject_section_store(struct mem_ctl_info *mci, | |||
676 | 676 | ||
677 | rc = strict_strtoul(data, 10, &value); | 677 | rc = strict_strtoul(data, 10, &value); |
678 | if ((rc < 0) || (value > 3)) | 678 | if ((rc < 0) || (value > 3)) |
679 | return 0; | 679 | return -EIO; |
680 | 680 | ||
681 | pvt->inject.section = (u32) value; | 681 | pvt->inject.section = (u32) value; |
682 | return count; | 682 | return count; |
@@ -709,7 +709,7 @@ static ssize_t i7core_inject_type_store(struct mem_ctl_info *mci, | |||
709 | 709 | ||
710 | rc = strict_strtoul(data, 10, &value); | 710 | rc = strict_strtoul(data, 10, &value); |
711 | if ((rc < 0) || (value > 7)) | 711 | if ((rc < 0) || (value > 7)) |
712 | return 0; | 712 | return -EIO; |
713 | 713 | ||
714 | pvt->inject.type = (u32) value; | 714 | pvt->inject.type = (u32) value; |
715 | return count; | 715 | return count; |
@@ -744,7 +744,7 @@ static ssize_t i7core_inject_eccmask_store(struct mem_ctl_info *mci, | |||
744 | 744 | ||
745 | rc = strict_strtoul(data, 10, &value); | 745 | rc = strict_strtoul(data, 10, &value); |
746 | if (rc < 0) | 746 | if (rc < 0) |
747 | return 0; | 747 | return -EIO; |
748 | 748 | ||
749 | pvt->inject.eccmask = (u32) value; | 749 | pvt->inject.eccmask = (u32) value; |
750 | return count; | 750 | return count; |