From: Colin Ian King <colin.king@xxxxxxxxxxxxx> All error paths to label out_term2 result in sess being null, so the check for sess being non-null and the call to put_sess is dead code and can therefore be removed. Detected with CoverityScan, CID#1420664 ("Logically dead code") Signed-off-by: Colin Ian King <colin.king@xxxxxxxxxxxxx> --- 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 0e03ca2ab3e5..32e07f21ddb2 100644 --- a/drivers/scsi/qla2xxx/qla_target.c +++ b/drivers/scsi/qla2xxx/qla_target.c @@ -5853,8 +5853,6 @@ static void qlt_abort_work(struct qla_tgt *tgt, return; out_term2: - if (sess) - ha->tgt.tgt_ops->put_sess(sess); spin_unlock_irqrestore(&ha->tgt.sess_lock, flags2); out_term: -- 2.11.0