Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1401ea04 authored by Karsten Graul's avatar Karsten Graul Committed by David S. Miller
Browse files

net/smc: handle all error codes from smc_conn_create()



Always set a reason_code when smc_conn_create() returns an error code.

Signed-off-by: default avatarKarsten Graul <kgraul@linux.ibm.com>
Signed-off-by: default avatarUrsula Braun <ubraun@linux.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2a4c57a9
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -463,6 +463,8 @@ static int smc_connect_rdma(struct smc_sock *smc)
			reason_code = SMC_CLC_DECL_MEM;/* insufficient memory*/
		else if (rc == -ENOLINK)
			reason_code = SMC_CLC_DECL_SYNCERR; /* synchr. error */
		else
			reason_code = SMC_CLC_DECL_INTERR; /* other error */
		goto decline_rdma_unlock;
	}
	link = &smc->conn.lgr->lnk[SMC_SINGLE_LINK];