diff options
author | Tomas Winkler <tomas.winkler@intel.com> | 2017-03-12 12:22:02 +0200 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2017-03-15 13:37:18 -0400 |
commit | 949d7fa158b2b1af533bdb1af0dda8ab103ac58d (patch) | |
tree | 33963807742388957feb1d2ef6a1f41b95916210 /drivers/scsi | |
parent | 2ef2884980873081a4edae92f9d88dd580c85f6e (diff) | |
download | linux-stable-949d7fa158b2b1af533bdb1af0dda8ab103ac58d.tar.gz linux-stable-949d7fa158b2b1af533bdb1af0dda8ab103ac58d.tar.bz2 linux-stable-949d7fa158b2b1af533bdb1af0dda8ab103ac58d.zip |
scsi: ufs: don't check unsigned type for a negative value
Fix compilation warning:
drivers/scsi/ufs/ufshcd.c:7645:13: warning: comparison of unsigned
expression < 0 is always false [-Wtype-limits]
if ((value < UFS_PM_LVL_0) || (value >= UFS_PM_LVL_MAX))
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Reviewed-by: Subhash Jadavani <subhashj@codeaurora.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/ufs/ufshcd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 1359913bf840..e8c26e6e6237 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -7642,7 +7642,7 @@ static inline ssize_t ufshcd_pm_lvl_store(struct device *dev, if (kstrtoul(buf, 0, &value)) return -EINVAL; - if ((value < UFS_PM_LVL_0) || (value >= UFS_PM_LVL_MAX)) + if (value >= UFS_PM_LVL_MAX) return -EINVAL; spin_lock_irqsave(hba->host->host_lock, flags); |