scsi: lpfc: remove redundant null check on eqe
authorColin Ian King <colin.king@canonical.com>
Fri, 8 Sep 2017 08:02:01 +0000 (09:02 +0100)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 15 Sep 2017 19:39:11 +0000 (15:39 -0400)
The pointer eqe is always non-null inside the while loop, so the check
to see if eqe is NULL is redudant and hence can be removed.

Detected by CoverityScan CID#1248693 ("Logically Dead Code")

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: James Smart <james.smart@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/lpfc/lpfc_sli.c

index 8b119f87b51d67382b89aa60500d9ffe6f18ab19..80036a9fae7fc72d052ad39bf30334e4689a8f09 100644 (file)
@@ -13760,9 +13760,6 @@ lpfc_sli4_hba_intr_handler(int irq, void *dev_id)
         * Process all the event on FCP fast-path EQ
         */
        while ((eqe = lpfc_sli4_eq_get(fpeq))) {
-               if (eqe == NULL)
-                       break;
-
                ccount += lpfc_sli4_hba_handle_eqe(phba, eqe, hba_eqidx);
                if (!(++ecount % fpeq->entry_repost) ||
                    ccount > LPFC_MAX_ISR_CQE)