Skip to content

Commit

Permalink
scsi: dpt_i2o: Remove always false 'chan < 0' statement
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Xiongfeng Wang authored and Martin K. Petersen committed Apr 30, 2020
1 parent 4a4c0cf commit 6f41f08
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/scsi/dpt_i2o.c
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit 6f41f08

Please sign in to comment.