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>
This commit is contained in:
Jiapeng Chong 2021-03-15 11:49:19 +08:00 committed by Martin K. Petersen
parent 0d556a21a9
commit 3070c72155

View File

@ -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;