diff options
author | Horst Hummel <horst.hummel@de.ibm.com> | 2006-12-04 09:40:18 -0500 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2006-12-04 09:40:18 -0500 |
commit | 645c98c8b6c09eae58ac2f97e0ade6ced4d6443f (patch) | |
tree | 797f2969acdc31440be44a5f699283fc6e874625 /drivers/s390 | |
parent | 29145a6c8cda3238049937612365e80b53c3f266 (diff) |
[S390] return 'count' for successful execution of dasd_eer_enable.
Currently the return value of 'dasd_eer_enable' is returned - even if the
function returned '0'. Now return 'count' for successful execution.
Signed-off-by: Horst Hummel <horst.hummel@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/block/dasd_devmap.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/s390/block/dasd_devmap.c b/drivers/s390/block/dasd_devmap.c index b5e70c523921..17fdd8c9f740 100644 --- a/drivers/s390/block/dasd_devmap.c +++ b/drivers/s390/block/dasd_devmap.c | |||
@@ -877,12 +877,13 @@ dasd_eer_store(struct device *dev, struct device_attribute *attr, | |||
877 | if (((endp + 1) < (buf + count)) || (val > 1)) | 877 | if (((endp + 1) < (buf + count)) || (val > 1)) |
878 | return -EINVAL; | 878 | return -EINVAL; |
879 | 879 | ||
880 | rc = count; | 880 | if (val) { |
881 | if (val) | ||
882 | rc = dasd_eer_enable(devmap->device); | 881 | rc = dasd_eer_enable(devmap->device); |
883 | else | 882 | if (rc) |
883 | return rc; | ||
884 | } else | ||
884 | dasd_eer_disable(devmap->device); | 885 | dasd_eer_disable(devmap->device); |
885 | return rc; | 886 | return count; |
886 | } | 887 | } |
887 | 888 | ||
888 | static DEVICE_ATTR(eer_enabled, 0644, dasd_eer_show, dasd_eer_store); | 889 | static DEVICE_ATTR(eer_enabled, 0644, dasd_eer_show, dasd_eer_store); |