lkml.org 
[lkml]   [2019]   [Feb]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] scsi: qla2xxx: remove redundant null check on pointer sess
Date
From: Colin Ian King <colin.king@canonical.com>

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.

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

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/scsi/qla2xxx/qla_target.c | 2 --
1 file changed, 2 deletions(-)

diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c
index 6b8c655d9eb4..9af329a5ed90 100644
--- a/drivers/scsi/qla2xxx/qla_target.c
+++ b/drivers/scsi/qla2xxx/qla_target.c
@@ -6396,8 +6396,6 @@ static void qlt_tmr_work(struct qla_tgt *tgt,
return;

out_term2:
- if (sess)
- ha->tgt.tgt_ops->put_sess(sess);
spin_unlock_irqrestore(&ha->tgt.sess_lock, flags);
out_term:
qlt_send_term_exchange(ha->base_qpair, NULL, &prm->tm_iocb2, 1, 0);
--
2.20.1
\
 
 \ /
  Last update: 2019-02-13 14:54    [W:0.036 / U:1.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site