u16 version, con_num, cid;
        u16 recon_cnt;
-       int err;
+       int err = -ECONNRESET;
 
        if (len < sizeof(*msg)) {
                pr_err("Invalid RTRS connection request\n");
-               goto reject_w_econnreset;
+               goto reject_w_err;
        }
        if (le16_to_cpu(msg->magic) != RTRS_MAGIC) {
                pr_err("Invalid RTRS magic\n");
-               goto reject_w_econnreset;
+               goto reject_w_err;
        }
        version = le16_to_cpu(msg->version);
        if (version >> 8 != RTRS_PROTO_VER_MAJOR) {
                pr_err("Unsupported major RTRS version: %d, expected %d\n",
                       version >> 8, RTRS_PROTO_VER_MAJOR);
-               goto reject_w_econnreset;
+               goto reject_w_err;
        }
        con_num = le16_to_cpu(msg->cid_num);
        if (con_num > 4096) {
                /* Sanity check */
                pr_err("Too many connections requested: %d\n", con_num);
-               goto reject_w_econnreset;
+               goto reject_w_err;
        }
        cid = le16_to_cpu(msg->cid);
        if (cid >= con_num) {
                /* Sanity check */
                pr_err("Incorrect cid: %d >= %d\n", cid, con_num);
-               goto reject_w_econnreset;
+               goto reject_w_err;
        }
        recon_cnt = le16_to_cpu(msg->recon_cnt);
        srv = get_or_create_srv(ctx, &msg->paths_uuid, msg->first_conn);
                        rtrs_err(s, "Session in wrong state: %s\n",
                                  rtrs_srv_state_str(sess->state));
                        mutex_unlock(&srv->paths_mutex);
-                       goto reject_w_econnreset;
+                       goto reject_w_err;
                }
                /*
                 * Sanity checks
                        rtrs_err(s, "Incorrect request: %d, %d\n",
                                  cid, con_num);
                        mutex_unlock(&srv->paths_mutex);
-                       goto reject_w_econnreset;
+                       goto reject_w_err;
                }
                if (s->con[cid]) {
                        rtrs_err(s, "Connection already exists: %d\n",
                                  cid);
                        mutex_unlock(&srv->paths_mutex);
-                       goto reject_w_econnreset;
+                       goto reject_w_err;
                }
        } else {
                sess = __alloc_sess(srv, cm_id, con_num, recon_cnt,
 reject_w_err:
        return rtrs_rdma_do_reject(cm_id, err);
 
-reject_w_econnreset:
-       return rtrs_rdma_do_reject(cm_id, -ECONNRESET);
-
 close_and_return_err:
        mutex_unlock(&srv->paths_mutex);
        close_sess(sess);