From: Horst Hummel Date: Mon, 4 Dec 2006 14:40:18 +0000 (+0100) Subject: [S390] return 'count' for successful execution of dasd_eer_enable. X-Git-Tag: v2.6.20-rc1~34^2~40^2~15^2~21 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=645c98c8b6c09eae58ac2f97e0ade6ced4d6443f;p=linux-2.6 [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 Signed-off-by: Martin Schwidefsky --- diff --git a/drivers/s390/block/dasd_devmap.c b/drivers/s390/block/dasd_devmap.c index b5e70c5239..17fdd8c9f7 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);