From: YANG LI abaci-bugfix@linux.alibaba.com
Commit bfb3f00c0613bf912771278422685c5409963bda upstream.
Fix the following coccicheck warning:
./drivers/scsi/mpt3sas/mpt3sas_base.c:2424:5-20: WARNING: Comparison of 0/1 to bool variable
Link: https://lore.kernel.org/r/1610355253-25960-1-git-send-email-abaci-bugfix@lin... Reported-by: Abaci Robot abaci@linux.alibaba.com Signed-off-by: YANG LI abaci-bugfix@linux.alibaba.com Signed-off-by: Martin K. Petersen martin.petersen@oracle.com Integrated-by: Siyu Zhang siyu.zhang@windriver.com --- drivers/scsi/mpt3sas/mpt3sas_base.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c index 64993f9d623e..f4d19b0bec23 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_base.c +++ b/drivers/scsi/mpt3sas/mpt3sas_base.c @@ -2506,8 +2506,8 @@ _base_check_pcie_native_sgl(struct MPT3SAS_ADAPTER *ioc, }
/* Check if we need to build a native SG list. */ - if (base_is_prp_possible(ioc, pcie_device, - scmd, sges_left) == 0) { + if (!base_is_prp_possible(ioc, pcie_device, + scmd, sges_left)) { /* We built a native SG list, just return. */ goto out; }