lkml.org 
[lkml]   [2019]   [Sep]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] scsi: dpt_i2o: drop unnecessary comparison statement
The type of 'chan' is u32 which contain non-negative value.
So 'chan < 0' is statment is always false.

Remove unnecessary comparison statement

Signed-off-by: Austin Kim <austindh.kim@gmail.com>
---
drivers/scsi/dpt_i2o.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/dpt_i2o.c b/drivers/scsi/dpt_i2o.c
index abc74fd..df48ef5 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];
--
2.6.2
\
 
 \ /
  Last update: 2019-09-09 07:43    [W:0.023 / U:6.840 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site