mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-25 18:30:06 +00:00
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: Karsten Graul <kgraul@linux.ibm.com> Signed-off-by: Ursula Braun <ubraun@linux.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
2a4c57a9e7
commit
1401ea045b
1 changed files with 2 additions and 0 deletions
|
@ -463,6 +463,8 @@ static int smc_connect_rdma(struct smc_sock *smc)
|
||||||
reason_code = SMC_CLC_DECL_MEM;/* insufficient memory*/
|
reason_code = SMC_CLC_DECL_MEM;/* insufficient memory*/
|
||||||
else if (rc == -ENOLINK)
|
else if (rc == -ENOLINK)
|
||||||
reason_code = SMC_CLC_DECL_SYNCERR; /* synchr. error */
|
reason_code = SMC_CLC_DECL_SYNCERR; /* synchr. error */
|
||||||
|
else
|
||||||
|
reason_code = SMC_CLC_DECL_INTERR; /* other error */
|
||||||
goto decline_rdma_unlock;
|
goto decline_rdma_unlock;
|
||||||
}
|
}
|
||||||
link = &smc->conn.lgr->lnk[SMC_SINGLE_LINK];
|
link = &smc->conn.lgr->lnk[SMC_SINGLE_LINK];
|
||||||
|
|
Loading…
Reference in a new issue