diff mbox series

scsi: bfa: fix warning comparing pointer to 0

Message ID 1615880930-120780-1-git-send-email-jiapeng.chong@linux.alibaba.com
State New
Headers show
Series scsi: bfa: fix warning comparing pointer to 0 | expand

Commit Message

Jiapeng Chong March 16, 2021, 7:48 a.m. UTC
Fix the following coccicheck warning:

./drivers/scsi/bfa/bfad_bsg.c:3412:29-30: WARNING comparing pointer to
0.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
 drivers/scsi/bfa/bfad_bsg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Martin K. Petersen March 30, 2021, 3:54 a.m. UTC | #1
On Tue, 16 Mar 2021 15:48:50 +0800, Jiapeng Chong wrote:

> Fix the following coccicheck warning:

> 

> ./drivers/scsi/bfa/bfad_bsg.c:3412:29-30: WARNING comparing pointer to

> 0.


Applied to 5.13/scsi-queue, thanks!

[1/1] scsi: bfa: fix warning comparing pointer to 0
      https://git.kernel.org/mkp/scsi/c/1630e752fb83

-- 
Martin K. Petersen	Oracle Linux Engineering
diff mbox series

Patch

diff --git a/drivers/scsi/bfa/bfad_bsg.c b/drivers/scsi/bfa/bfad_bsg.c
index fc51542..be8dfbe 100644
--- a/drivers/scsi/bfa/bfad_bsg.c
+++ b/drivers/scsi/bfa/bfad_bsg.c
@@ -3409,7 +3409,7 @@ 
 
 	drv_fcxp->port = fcs_port->bfad_port;
 
-	if (drv_fcxp->port->bfad == 0)
+	if (!drv_fcxp->port->bfad)
 		drv_fcxp->port->bfad = bfad;
 
 	/* Fetch the bfa_rport - if nexus needed */