> @@ -362,12 +370,17 @@ int __transport_register_session(struct se_portal_group *se_tpg, > * eg: *NOT* discovery sessions. > */ > if (se_nacl) > - __transport_register_session_with_nacl(se_nacl, se_sess); > + ret = __transport_register_session_with_nacl(se_nacl, se_sess); > + > + if (ret < 0) > + goto out; > + > list_add_tail(&se_sess->sess_list, &se_tpg->tpg_sess_list); > > pr_debug("TARGET_CORE[%s]: Registered fabric_sess_ptr: %p\n", > se_tpg->se_tpg_tfo->get_fabric_name(), se_sess->fabric_sess_ptr); > > +out: > return ret; > } > EXPORT_SYMBOL(__transport_register_session); > @@ -378,10 +391,11 @@ int transport_register_session(struct se_portal_group *se_tpg, > void *fabric_sess_ptr) > { > unsigned long flags; > - int ret = 0; > + int ret; > > spin_lock_irqsave(&se_tpg->session_lock, flags); > - __transport_register_session(se_tpg, se_nacl, se_sess, fabric_sess_ptr); > + ret = __transport_register_session(se_tpg, se_nacl, se_sess, > + fabric_sess_ptr); > spin_unlock_irqrestore(&se_tpg->session_lock, flags); > > return ret; These two hunks should have been in the patches introducing the return values. Otherwise looks good: Reviewed-by: Christoph Hellwig <hch@xxxxxx> -- To unsubscribe from this list: send the line "unsubscribe target-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html