scsi: qla2xxx: Fix a locking imbalance in qlt_24xx_handle_els()

Ensure that upon return the tgt->ha->tgt.sess_lock spin lock is unlocked
no matter which code path is taken through this function.  This was
detected by sparse.

Fixes: 82abdcaf3e ("scsi: qla2xxx: Allow target mode to accept PRLI in dual mode")
Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
Cc: Himanshu Madhani <himanshu.madhani@cavium.com>
Cc: Quinn Tran <quinn.tran@cavium.com>
Acked-by: Himanshu Madhani <himanshu.madhani@cavium.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
Bart Van Assche 2018-01-23 16:33:46 -08:00 коммит произвёл Martin K. Petersen
Родитель f5572475e9
Коммит 50dbd09c56
1 изменённых файлов: 0 добавлений и 2 удалений

Просмотреть файл

@ -4871,8 +4871,6 @@ static int qlt_24xx_handle_els(struct scsi_qla_host *vha,
sess);
qlt_send_term_imm_notif(vha, iocb, 1);
res = 0;
spin_lock_irqsave(&tgt->ha->tgt.sess_lock,
flags);
break;
}