summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiapeng Chong <jiapeng.chong@linux.alibaba.com>2021-03-15 06:49:19 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2021-03-25 05:35:08 +0300
commit3070c72155c5bba86c02f0a8a7493b0c16a9bfdd (patch)
tree4228d5f69fd1a351eb66bc210ca37b7d649a31f3
parent0d556a21a9dae9ec4e2373825da653447e4eb79c (diff)
downloadlinux-3070c72155c5bba86c02f0a8a7493b0c16a9bfdd.tar.xz
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. Link: https://lore.kernel.org/r/1615780159-94708-1-git-send-email-jiapeng.chong@linux.alibaba.com Reported-by: Abaci Robot <abaci@linux.alibaba.com> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-rw-r--r--drivers/scsi/qla1280.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/qla1280.c b/drivers/scsi/qla1280.c
index 95008811b2d2..8f35174a1f9a 100644
--- a/drivers/scsi/qla1280.c
+++ b/drivers/scsi/qla1280.c
@@ -3054,7 +3054,7 @@ qla1280_32bit_start_scsi(struct scsi_qla_host *ha, struct srb * sp)
/* 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;