scsi: bfa: Fix warning comparing pointer to 0
authorJiapeng Chong <jiapeng.chong@linux.alibaba.com>
Tue, 16 Mar 2021 07:48:50 +0000 (15:48 +0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 25 Mar 2021 02:35:39 +0000 (22:35 -0400)
Fix the following coccicheck warning:

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

Link: https://lore.kernel.org/r/1615880930-120780-1-git-send-email-jiapeng.chong@linux.alibaba.com
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/bfa/bfad_bsg.c

index fc51542..be8dfbe 100644 (file)
@@ -3409,7 +3409,7 @@ bfad_im_bsg_els_ct_request(struct bsg_job *job)
 
        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 */