scsi: qla2xxx: Simplify the calculation of variables
authorJiapeng Zhong <abaci-bugfix@linux.alibaba.com>
Tue, 26 Jan 2021 08:42:34 +0000 (16:42 +0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 29 Jan 2021 18:34:10 +0000 (13:34 -0500)
Fix the following coccicheck warnings:

./drivers/scsi/qla2xxx/qla_nvme.c:288:24-26: WARNING !A || A && B is
equivalent to !A || B.

Link: https://lore.kernel.org/r/1611650554-33019-1-git-send-email-abaci-bugfix@linux.alibaba.com
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Jiapeng Zhong <abaci-bugfix@linux.alibaba.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/qla2xxx/qla_nvme.c

index 017b4c2..0237588 100644 (file)
@@ -291,7 +291,7 @@ static int qla_nvme_ls_req(struct nvme_fc_local_port *lport,
        struct qla_hw_data *ha;
        srb_t           *sp;
 
-       if (!fcport || (fcport && fcport->deleted))
+       if (!fcport || fcport->deleted)
                return rval;
 
        vha = fcport->vha;