summaryrefslogtreecommitdiffstats
path: root/drivers/s390/block/dasd_devmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390/block/dasd_devmap.c')
-rw-r--r--drivers/s390/block/dasd_devmap.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/s390/block/dasd_devmap.c b/drivers/s390/block/dasd_devmap.c
index b5e70c5..17fdd8c 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,
if (((endp + 1) < (buf + count)) || (val > 1))
return -EINVAL;
- rc = count;
- if (val)
+ if (val) {
rc = dasd_eer_enable(devmap->device);
- else
+ if (rc)
+ return rc;
+ } else
dasd_eer_disable(devmap->device);
- return rc;
+ return count;
}
static DEVICE_ATTR(eer_enabled, 0644, dasd_eer_show, dasd_eer_store);
OpenPOWER on IntegriCloud