scsi: lpfc: Simplify bool comparison
authorYANG LI <abaci-bugfix@linux.alibaba.com>
Tue, 12 Jan 2021 08:24:53 +0000 (16:24 +0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 13 Jan 2021 05:28:22 +0000 (00:28 -0500)
Fix the following coccicheck warning:

./drivers/scsi/lpfc/lpfc_bsg.c:5392:5-29: WARNING: Comparison to bool

Link: https://lore.kernel.org/r/1610439893-64872-1-git-send-email-abaci-bugfix@linux.alibaba.com
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Reviewed-by: James Smart <james.smart@broadcom.com>
Signed-off-by: YANG LI <abaci-bugfix@linux.alibaba.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/lpfc/lpfc_bsg.c

index eed6ea5..b974d39 100644 (file)
@@ -5376,9 +5376,9 @@ lpfc_check_fwlog_support(struct lpfc_hba *phba)
 
        ras_fwlog = &phba->ras_fwlog;
 
-       if (ras_fwlog->ras_hwsupport == false)
+       if (!ras_fwlog->ras_hwsupport)
                return -EACCES;
-       else if (ras_fwlog->ras_enabled == false)
+       else if (!ras_fwlog->ras_enabled)
                return -EPERM;
        else
                return 0;