mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
scsi: qla2xxx: don't allow negative thresholds
We shouldn't allow negative thresholds. I don't know what it would do
but it can't be good.
Fixes: 8b4673ba3a
("scsi: qla2xxx: Add support for ZIO6 interrupt threshold")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Himanshu Madhani <himanshu.madhani@cavium.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
84e13c453d
commit
1703659dad
@ -1228,7 +1228,7 @@ qla_zio_threshold_store(struct device *dev, struct device_attribute *attr,
|
||||
return -EINVAL;
|
||||
if (sscanf(buf, "%d", &val) != 1)
|
||||
return -EINVAL;
|
||||
if (val > 256)
|
||||
if (val < 0 || val > 256)
|
||||
return -ERANGE;
|
||||
|
||||
atomic_set(&vha->hw->zio_threshold, val);
|
||||
|
Loading…
Reference in New Issue
Block a user