scsi: lpfc: remove redundant null check on eqe
Subsystems (3)
PATCH 1/1 scsi: lpfc: remove redundant null check on eqe
From: Colin Ian King <[email protected]>
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 <[email protected]>
--- drivers/scsi/lpfc/lpfc_sli.c | 3 --- 1 file changed, 3 deletions(-)
drivers/scsi/lpfc/lpfc_sli.c +0 -3
@@ -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 )
Signature · 1 line
2.14.1
Quoted 9 lines · Colin King
From: Colin Ian King <[email protected]>
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 <[email protected]>
Yep. thank you
Signed-off-by James Smart <[email protected]>
Martin K. Petersen
AppliedColin,
Quoted 2 lines
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.
Applied to 4.15/scsi-queue. Thanks!
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering