OSDN Git Service

scsi: lpfc: Replace BUG() with BUG_ON()
authorShyam Saini <mayhs11saini@gmail.com>
Sat, 24 Dec 2016 10:51:07 +0000 (16:21 +0530)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 20 Jan 2017 21:48:33 +0000 (16:48 -0500)
Replace BUG() with BUG_ON() using coccinelle.

Signed-off-by: Shyam Saini <mayhs11saini@gmail.com>
Acked-by: James Smart <james.smart@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/lpfc/lpfc_els.c

index 27f0cbb..ede14f1 100644 (file)
@@ -8855,8 +8855,7 @@ lpfc_cmpl_fabric_iocb(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
 {
        struct ls_rjt stat;
 
-       if ((cmdiocb->iocb_flag & LPFC_IO_FABRIC) != LPFC_IO_FABRIC)
-               BUG();
+       BUG_ON((cmdiocb->iocb_flag & LPFC_IO_FABRIC) != LPFC_IO_FABRIC);
 
        switch (rspiocb->iocb.ulpStatus) {
                case IOSTAT_NPORT_RJT: