scsi: qla2xxx: Remove a superfluous pointer check
authorBart Van Assche <bvanassche@acm.org>
Fri, 9 Aug 2019 03:01:37 +0000 (20:01 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 13 Aug 2019 01:34:05 +0000 (21:34 -0400)
Checking a pointer after it has been dereferenced is not useful. This was
detected by Coverity.

Cc: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Tested-by: Himanshu Madhani <hmadhani@marvell.com>
Reviewed-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/qla2xxx/qla_nvme.c

index 16028ee8c7a7b9aed3a076252ae7ed0f728d7b3c..bba25c38a118912b2b0af7433f87993552ddc534 100644 (file)
@@ -222,7 +222,7 @@ static void qla_nvme_abort_work(struct work_struct *work)
               "%s called for sp=%p, hndl=%x on fcport=%p deleted=%d\n",
               __func__, sp, sp->handle, fcport, fcport->deleted);
 
-       if (!ha->flags.fw_started && (fcport && fcport->deleted))
+       if (!ha->flags.fw_started && fcport->deleted)
                goto out;
 
        if (ha->flags.host_shutting_down) {