From: Colin Ian King Date: Fri, 8 Sep 2017 08:02:01 +0000 (+0100) Subject: scsi: lpfc: remove redundant null check on eqe X-Git-Tag: v4.1.12-124.31.3~1003 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=077131e9bfbe020b291cfcb4f372dd1b14a9a946;p=users%2Fjedix%2Flinux-maple.git scsi: lpfc: remove redundant null check on eqe Orabug: 27631736 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 Acked-by: James Smart Signed-off-by: Martin K. Petersen (cherry picked from commit 858e51e8cbe11a8c59b24aaf4cb40f7f4e7a2feb) Signed-off-by: Dick dkennedy Conflicts: drivers/scsi/lpfc/lpfc_sli.c Base nvme patch Signed-off-by: Dan Duval Reviewed-by: Jack Vogel --- diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c index 7ae81b333d81..bbfbc8370553 100644 --- a/drivers/scsi/lpfc/lpfc_sli.c +++ b/drivers/scsi/lpfc/lpfc_sli.c @@ -12858,8 +12858,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; lpfc_sli4_hba_handle_eqe(phba, eqe, fcp_eqidx); if (!(++ecount % fpeq->entry_repost))