]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/scsi/scsi_sysfs.c
Merge tag 'dlm-3.19' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm
[karo-tx-linux.git] / drivers / scsi / scsi_sysfs.c
index 35d93b0af82b8163e5e9c1653689903e8814fd7c..1cb64a8e18c91475d7f0bda12246fe7862782c03 100644 (file)
@@ -877,11 +877,10 @@ sdev_store_queue_depth(struct device *dev, struct device_attribute *attr,
 
        depth = simple_strtoul(buf, NULL, 0);
 
-       if (depth < 1)
+       if (depth < 1 || depth > sht->can_queue)
                return -EINVAL;
 
-       retval = sht->change_queue_depth(sdev, depth,
-                                        SCSI_QDEPTH_DEFAULT);
+       retval = sht->change_queue_depth(sdev, depth);
        if (retval < 0)
                return retval;