scsi: qla2xxx: Simplify if statement
authorJiapeng Chong <jiapeng.chong@linux.alibaba.com>
Wed, 3 Feb 2021 02:26:30 +0000 (10:26 +0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 9 Feb 2021 03:09:59 +0000 (22:09 -0500)
Fix the following coccicheck warnings:

./drivers/scsi/qla2xxx/qla_target.c:984:12-14: WARNING !A || A && B is
equivalent to !A || B.

Link: https://lore.kernel.org/r/1612319190-111421-1-git-send-email-jiapeng.chong@linux.alibaba.com
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/qla2xxx/qla_target.c

index 0d09480..c48daf5 100644 (file)
@@ -981,8 +981,7 @@ void qlt_free_session_done(struct work_struct *work)
                        int rc;
 
                        if (!own ||
-                           (own &&
-                            (own->iocb.u.isp24.status_subcode == ELS_PLOGI))) {
+                            (own->iocb.u.isp24.status_subcode == ELS_PLOGI)) {
                                rc = qla2x00_post_async_logout_work(vha, sess,
                                    NULL);
                                if (rc != QLA_SUCCESS)