From patchwork Tue Feb 14 18:56:34 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 9572529 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id ED09D601E7 for ; Tue, 14 Feb 2017 18:56:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C5F1027DCD for ; Tue, 14 Feb 2017 18:56:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BACB82845E; Tue, 14 Feb 2017 18:56:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6461127DCD for ; Tue, 14 Feb 2017 18:56:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752876AbdBNS4x (ORCPT ); Tue, 14 Feb 2017 13:56:53 -0500 Received: from esa1.hgst.iphmx.com ([68.232.141.245]:26512 "EHLO esa1.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752324AbdBNS4r (ORCPT ); Tue, 14 Feb 2017 13:56:47 -0500 X-IronPort-AV: E=Sophos;i="5.33,348,1477929600"; d="scan'208";a="86579479" Received: from unknown (HELO milsmgep15.sandisk.com) ([63.163.107.21]) by ob1.hgst.iphmx.com with ESMTP; 15 Feb 2017 02:56:44 +0800 Received: from MILHUBIP03.sdcorp.global.sandisk.com (Unknown_Domain [10.201.67.162]) (using TLS with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by (Symantec Messaging Gateway) with SMTP id 5D.34.57638.BE253A85; Tue, 14 Feb 2017 10:56:44 -0800 (PST) Received: from milsmgip12.sandisk.com (10.177.9.6) by MILHUBIP03.sdcorp.global.sandisk.com (10.177.9.96) with Microsoft SMTP Server id 14.3.319.2; Tue, 14 Feb 2017 10:56:39 -0800 X-AuditID: 0ac94369-26dee9800001e126-51-58a352eba14d Received: from exp-402881.sdcorp.global.sandisk.com ( [10.177.9.6]) by (Symantec Messaging Gateway) with SMTP id E2.D6.18148.8E253A85; Tue, 14 Feb 2017 10:56:40 -0800 (PST) From: Bart Van Assche To: Doug Ledford CC: , Bart Van Assche , Israel Rukshin , Max Gurtovoy , Laurence Oberman Subject: [PATCH v2 6/8] IB/srp: Improve an error path Date: Tue, 14 Feb 2017 10:56:34 -0800 Message-ID: <20170214185636.29250-7-bart.vanassche@sandisk.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170214185636.29250-1-bart.vanassche@sandisk.com> References: <20170214185636.29250-1-bart.vanassche@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrBLMWRmVeSWpSXmKPExsXCddJ5ke6boMURBgvWcVm8PP+B1eLG4rUs Fs8O9bJYnP/wisni9KMD7A6sHs+mH2byeL/vKpvH501yAcxRXDYpqTmZZalF+nYJXBld35aw FqzhrGh+eY+1gfEUexcjJ4eEgInE1B2/2boYuTiEBJYySezvOskI4WxjlHhxfxorTNXVlQ9Y IRIbGSXeXulgBEmwCRhJfHs/kwXEFhFQk9j0ahE7SBGzwGFGifffZ4MVCQuYSmz4fQqsiEVA VWLn8btMIDavgL3EwwP7WCA2yEvsarsIto1TwEFi5reFYLYQUM3Z/jlgQyUE2lglbr7bwA7R LChxcuYTsGZmAQmJgy9eMEM0qEucXDKfaQKj0CwkZbOQlC1gZFrFKJabmVOcm55aYGiqV5yY l5JZnK2XnJ+7iRES3pk7GO8+8T7EKMDBqMTDe0J2cYQQa2JZcWXuIUYJDmYlEV4NB6AQb0pi ZVVqUX58UWlOavEhRmkOFiVx3nMyUyOEBNITS1KzU1MLUotgskwcnFINjHqb1j8P25dfslTk 3uXUVzkLftv/Or/98aqc2Vzx65oeXAmunJ3u+LFygaKoVVNAqM0bnS33r93IVH36UGb7cgU9 uRmcd4zevGCbZeEQoNTMeK97nuLR2PON6cJ8u8+xfnf/ulckXLuiP/jmuqADk+s9m9V5+H/+ cys+dPzXdpcNljLH4o9e41JiKc5INNRiLipOBACLADOyawIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrGJMWRmVeSWpSXmKPExsXCtZGTTfdF0OIIg6NzeSwO/mxjtHh5/gOr xY3Fa1ksnh3qZbE4/+EVk8XpRwfYHdg8nk0/zOTxft9VNo9pa84zeXzeJBfAEsVlk5Kak1mW WqRvl8CV0fVtCWvBGs6K5pf3WBsYT7F3MXJySAiYSFxd+YC1i5GLQ0hgPaPE9dt3mEESbAJG Et/ez2QBsUUE1CQ2vVoE1sAscJRRYs5HbhBbWMBUYsPvU2A1LAKqEjuP32UCsXkF7CWmv57G BLFAXmJX20VWEJtTwEFi5reFYLYQUM3Z/jnsExi5FzAyrGIUy83MKc5NzywwNNIrTsxLySzO 1kvOz93ECAmJqB2M1yeaH2Jk4uCUamDcvmORfZcV64LbVlunlTRvkXMuPZpp2GO2Zea0p8fZ PM/xXQme+uz/vKr+FPa4ej1b0bOzVSrsfsq0sqVOeNeytXdCyCrht78cDCZvW2rse/GRNGNu 19HZvxZVOz9OEzqs4nvzQx/L3XVcT5yvZpfVr/no/GC6gciXAweUty8Jl7J/Gnl8VWinEktx RqKhFnNRcSIAvPuNBLkBAAA= MIME-Version: 1.0 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Avoid that the following message is printed if login fails: scsi host0: ib_srp: Sending CM DREQ failed Signed-off-by: Bart Van Assche Cc: Israel Rukshin Cc: Max Gurtovoy Cc: Laurence Oberman --- drivers/infiniband/ulp/srp/ib_srp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c index 9115d2902ad4..b303b4331e98 100644 --- a/drivers/infiniband/ulp/srp/ib_srp.c +++ b/drivers/infiniband/ulp/srp/ib_srp.c @@ -3441,7 +3441,7 @@ static ssize_t srp_create_target(struct device *dev, target->ch_count, ch->target->orig_dgid.raw); if (node_idx == 0 && cpu_idx == 0) { - goto err_disconnect; + goto free_ch; } else { srp_free_ch_ib(target, ch); srp_free_req_data(target, ch); @@ -3488,6 +3488,7 @@ static ssize_t srp_create_target(struct device *dev, err_disconnect: srp_disconnect_target(target); +free_ch: for (i = 0; i < target->ch_count; i++) { ch = &target->ch[i]; srp_free_ch_ib(target, ch);