]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: qla2xxx: remove redundant null check on pointer sess
authorColin Ian King <colin.king@canonical.com>
Fri, 15 Feb 2019 09:52:32 +0000 (09:52 +0000)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 19 Feb 2019 23:58:35 +0000 (18:58 -0500)
commitad60b7c2e60431534ad3a1065f6b716f94b5ca48
treedd9f8fa2482c714e2d95b8b700dd6c70485a0e1b
parentd3d953d7b84178d72c185efe0b22434f5303a1a9
scsi: qla2xxx: remove redundant null check on pointer sess

The null check on pointer sess and the subsequent call is redundant as sess
is null on all the the paths that lead to the out_term2 label.  Hence the
null check and the call can be removed.  Also remove the redundant setting
of sess to NULL as this is not required now.

Detected by CoverityScan, CID#1420663 ("Logically dead code")

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/qla2xxx/qla_target.c