@@ -2144,6 +2144,7 @@ static int srpt_create_ch_ib(struct srpt_rdma_ch *ch)
if (IS_ERR(ch->thread)) {
printk(KERN_ERR "failed to create kernel thread %ld\n",
PTR_ERR(ch->thread));
+ ret = PTR_ERR(ch->thread);
ch->thread = NULL;
goto err_destroy_qp;
}
@@ -2589,6 +2590,7 @@ static int srpt_cm_req_recv(struct ib_cm_id *cm_id,
" configured yet for initiator %s.\n", ch->sess_name);
rej->reason = __constant_cpu_to_be32(
SRP_LOGIN_REJ_CHANNEL_LIMIT_REACHED);
+ ret = -ENOENT;
goto destroy_ib;
}
@@ -2597,6 +2599,7 @@ static int srpt_cm_req_recv(struct ib_cm_id *cm_id,
rej->reason = __constant_cpu_to_be32(
SRP_LOGIN_REJ_INSUFFICIENT_RESOURCES);
pr_debug("Failed to create session\n");
+ ret = PTR_ERR(ch->sess);
goto deregister_session;
}
ch->sess->se_node_acl = &nacl->nacl;