qla2x00t: Keep smatch happy

Smatch reports two warnings on the qla2x00t code:
* sess->local being tested while sess can be NULL.
* The code after the out_unreg_target2x label is only necessary in the procfs build.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4486 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Vladislav Bolkhovitin
2012-08-27 21:50:15 +00:00
parent 0ab789c476
commit dd37831c06
+2 -2
View File
@@ -1274,7 +1274,7 @@ static void q2t_fc_port_added(scsi_qla_host_t *ha, fc_port_t *fcport)
sess->conf_compl_supported = fcport->conf_compl_supported;
}
if (sess->local) {
if (sess && sess->local) {
TRACE(TRACE_MGMT, "qla2x00t(%ld): local session for "
"port %02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x "
"(loop ID %d) became global", ha->instance,
@@ -6610,9 +6610,9 @@ out:
#ifdef CONFIG_SCST_PROC
out_unreg_target2x:
#endif
scst_unregister_target_template(&tgt2x_template);
qla2xxx_tgt_unregister_driver();
#endif
out_mempool_free:
mempool_destroy(q2t_mgmt_cmd_mempool);