[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1615780159-94708-1-git-send-email-jiapeng.chong@linux.alibaba.com>
Date: Mon, 15 Mar 2021 11:49:19 +0800
From: Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
To: mdr@....com
Cc: jejb@...ux.ibm.com, martin.petersen@...cle.com,
linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org,
Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
Subject: [PATCH] scsi: qla1280: fix warning comparing pointer to 0
Fix the following coccicheck warning:
./drivers/scsi/qla1280.c:3057:37-38: WARNING comparing pointer to 0.
Reported-by: Abaci Robot <abaci@...ux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
---
drivers/scsi/qla1280.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/qla1280.c b/drivers/scsi/qla1280.c
index 46de254..699da47 100644
--- a/drivers/scsi/qla1280.c
+++ b/drivers/scsi/qla1280.c
@@ -3054,7 +3054,7 @@ static void qla1280_mailbox_timeout(struct timer_list *t)
/* Check for empty slot in outstanding command list. */
for (cnt = 0; cnt < MAX_OUTSTANDING_COMMANDS &&
- (ha->outstanding_cmds[cnt] != 0); cnt++) ;
+ ha->outstanding_cmds[cnt]; cnt++);
if (cnt >= MAX_OUTSTANDING_COMMANDS) {
status = SCSI_MLQUEUE_HOST_BUSY;
--
1.8.3.1
Powered by blists - more mailing lists