diff options
author | Xiongfeng Wang <wangxiongfeng2@huawei.com> | 2020-04-29 20:10:18 +0800 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2020-04-29 22:14:23 -0400 |
commit | 6f41f08c88c59ae6e32d32563c9af73ae2d71ece (patch) | |
tree | 9e70b8a68ab18ec9e213e7bbb7210540429d0c19 /drivers/scsi/dpt_i2o.c | |
parent | 4a4c0cfb4be74e216dd4446b254594707455bfc6 (diff) | |
download | linux-6f41f08c88c59ae6e32d32563c9af73ae2d71ece.tar.gz |
scsi: dpt_i2o: Remove always false 'chan < 0' statement
The channel index is represented by an unsigned variable 'u32 chan'. We
don't need to check whether it is less than zero, the 'chan < 0' statement
is always false. Remove it.
Link: https://lore.kernel.org/r/1588162218-61757-1-git-send-email-wangxiongfeng2@huawei.com
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Xiongfeng Wang <wangxiongfeng2@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/dpt_i2o.c')
-rw-r--r-- | drivers/scsi/dpt_i2o.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/dpt_i2o.c b/drivers/scsi/dpt_i2o.c index 02dff3a684e0..2cf889512ece 100644 --- a/drivers/scsi/dpt_i2o.c +++ b/drivers/scsi/dpt_i2o.c @@ -1120,7 +1120,7 @@ static struct adpt_device* adpt_find_device(adpt_hba* pHba, u32 chan, u32 id, u6 { struct adpt_device* d; - if(chan < 0 || chan >= MAX_CHANNEL) + if (chan >= MAX_CHANNEL) return NULL; d = pHba->channel[chan].device[id]; |