From: Stefan Haberland Date: Wed, 25 Jan 2017 13:08:20 +0000 (+0100) Subject: s390/dasd: allow 0 for path_threshold attribute X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=defc2a9b9899511445cfbaa2c3a6509964b71207;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git s390/dasd: allow 0 for path_threshold attribute Allow 0 as valid input for the path_threshold attribute to deactivate the IFCC/CCC error handling. Signed-off-by: Stefan Haberland Signed-off-by: Martin Schwidefsky --- diff --git a/drivers/s390/block/dasd_devmap.c b/drivers/s390/block/dasd_devmap.c index 041bdc4429c1..1164b51d09f3 100644 --- a/drivers/s390/block/dasd_devmap.c +++ b/drivers/s390/block/dasd_devmap.c @@ -1518,14 +1518,12 @@ dasd_path_threshold_store(struct device *dev, struct device_attribute *attr, if (IS_ERR(device)) return -ENODEV; - if ((kstrtoul(buf, 10, &val) != 0) || - (val > DASD_THRHLD_MAX) || val == 0) { + if (kstrtoul(buf, 10, &val) != 0 || val > DASD_THRHLD_MAX) { dasd_put_device(device); return -EINVAL; } spin_lock_irqsave(get_ccwdev_lock(to_ccwdev(dev)), flags); - if (val) - device->path_thrhld = val; + device->path_thrhld = val; spin_unlock_irqrestore(get_ccwdev_lock(to_ccwdev(dev)), flags); dasd_put_device(device); return count;