From: Jiapeng Chong Date: Tue, 16 Mar 2021 07:48:50 +0000 (+0800) Subject: scsi: bfa: Fix warning comparing pointer to 0 X-Git-Tag: v5.13-rc1~103^2~174 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1630e752fb8340b188c45eed4fe52a9f2a918e27;p=thirdparty%2Fkernel%2Flinux.git scsi: bfa: Fix warning comparing pointer to 0 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 Signed-off-by: Jiapeng Chong Signed-off-by: Martin K. Petersen --- diff --git a/drivers/scsi/bfa/bfad_bsg.c b/drivers/scsi/bfa/bfad_bsg.c index fc515424ca88d..be8dfbe13e904 100644 --- a/drivers/scsi/bfa/bfad_bsg.c +++ b/drivers/scsi/bfa/bfad_bsg.c @@ -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 */