From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ursula Braun Subject: [PATCH net-next 07/10] net/smc: handle all error codes from smc_conn_create() Date: Tue, 15 May 2018 17:05:00 +0200 Message-ID: <20180515150503.47265-8-ubraun@linux.ibm.com> References: <20180515150503.47265-1-ubraun@linux.ibm.com> Cc: netdev@vger.kernel.org, linux-s390@vger.kernel.org, schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com, raspl@linux.ibm.com, ubraun@linux.ibm.com To: davem@davemloft.net Return-path: Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:47364 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753000AbeEOPF0 (ORCPT ); Tue, 15 May 2018 11:05:26 -0400 Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w4FF0GhQ087001 for ; Tue, 15 May 2018 11:05:25 -0400 Received: from e06smtp14.uk.ibm.com (e06smtp14.uk.ibm.com [195.75.94.110]) by mx0a-001b2d01.pphosted.com with ESMTP id 2j00atd9c9-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 15 May 2018 11:05:24 -0400 Received: from localhost by e06smtp14.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 15 May 2018 16:05:18 +0100 In-Reply-To: <20180515150503.47265-1-ubraun@linux.ibm.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Karsten Graul Always set a reason_code when smc_conn_create() returns an error code. Signed-off-by: Karsten Graul Signed-off-by: Ursula Braun --- net/smc/af_smc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/smc/af_smc.c b/net/smc/af_smc.c index 397ba2182453..ecf9ba68501b 100644 --- a/net/smc/af_smc.c +++ b/net/smc/af_smc.c @@ -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]; -- 2.16.3