From patchwork Fri Feb 10 23:56:08 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: 9567617 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 AC488602B6 for ; Fri, 10 Feb 2017 23:56:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9905D285D2 for ; Fri, 10 Feb 2017 23:56:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8DF04285EA; Fri, 10 Feb 2017 23:56:30 +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 37459285D2 for ; Fri, 10 Feb 2017 23:56:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751934AbdBJX42 (ORCPT ); Fri, 10 Feb 2017 18:56:28 -0500 Received: from esa1.hgst.iphmx.com ([68.232.141.245]:7613 "EHLO esa1.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751430AbdBJX4V (ORCPT ); Fri, 10 Feb 2017 18:56:21 -0500 X-IronPort-AV: E=Sophos;i="5.33,348,1477929600"; d="scan'208";a="83251605" Received: from unknown (HELO milsmgep15.sandisk.com) ([63.163.107.21]) by ob1.hgst.iphmx.com with ESMTP; 11 Feb 2017 07:56:18 +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 3B.5A.57638.2235E985; Fri, 10 Feb 2017 15:56:18 -0800 (PST) Received: from milsmgip11.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; Fri, 10 Feb 2017 15:56:14 -0800 X-AuditID: 0ac94369-26dee9800001e126-50-589e53226438 Received: from exp-402881.sdcorp.global.sandisk.com ( [10.177.8.100]) by (Symantec Messaging Gateway) with SMTP id FE.A4.11415.E135E985; Fri, 10 Feb 2017 15:56:14 -0800 (PST) From: Bart Van Assche To: Doug Ledford CC: , Bart Van Assche , Israel Rukshin , Max Gurtovoy , Laurence Oberman Subject: [PATCH 5/8] IB/srp: Improve an error path Date: Fri, 10 Feb 2017 15:56:08 -0800 Message-ID: <20170210235611.3243-6-bart.vanassche@sandisk.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170210235611.3243-1-bart.vanassche@sandisk.com> References: <20170210235611.3243-1-bart.vanassche@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrBLMWRmVeSWpSXmKPExsXCddJ5ka5S8LwIg9ez1Sxenv/AanFj8VoW i2eHelkszn94xWRx+tEBdgdWj2fTDzN5vN93lc3j8ya5AOYoLpuU1JzMstQifbsEroyPp3az FKzhrFixoJetgfEUexcjJ4eEgInEt90tjF2MXBxCAkuZJCZ9P8wG4WxjlHgw6xEjTNWTv03M EInNjBJLLp0HS7AJGEl8ez+TBcQWEVCT2PRqETtIEbPAYUaJ999ngxUJAxU1zlzCBmKzCKhK zO7fD9bAK2An0d90kw1ig7zErraLrCA2p4C9xPdl08BsIaCaN18/sYIMlRBoYpW4f+ohE0Sz oMTJmU/ABjELSEgcfPGCGaJBXeLkkvlMExiFZiEpm4WkbAEj0ypGsdzMnOLc9NQCQ1O94sS8 lMzibL3k/NxNjJDwztzBePeJ9yFGAQ5GJR7ehONzI4RYE8uKK3MPMUpwMCuJ8Ca5zosQ4k1J rKxKLcqPLyrNSS0+xCjNwaIkzntOZmqEkEB6YklqdmpqQWoRTJaJg1OqgbHfV2D60+r+PcfM N6ZcfCS4I+xiuHNQ6ePjj7eKLTpadDVcdsldrUfLVv4TmT/jgN26O3yLyzeUT515ypU35KLn uZU9yycd+spj/Ful5nRSWOA0l3iB3Ye2Z84+UmKqHqs0N+fr/zBL4UkzZ90UCD/HvUdJgLG2 2H1f6fP+XZkPl1vUv/V05GZVYinOSDTUYi4qTgQA9HroV2sCAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrKJMWRmVeSWpSXmKPExsXCtZEjRVc+eF6EwQpui4M/2xgtXp7/wGpx Y/FaFotnh3pZLM5/eMVkcfrRAXYHNo9n0w8zebzfd5XNY9qa80wenzfJBbBEcdmkpOZklqUW 6dslcGV8PLWbpWANZ8WKBb1sDYyn2LsYOTkkBEwknvxtYu5i5OIQEtjIKLH3VDMLSIJNwEji 2/uZYLaIgJrEpleLwBqYBY4ySsz5yA1iCwPVNM5cwgZiswioSszu3w9WzytgJ3H2xC9GiAXy ErvaLrKC2JwC9hLfl00Ds4WAat58/cQ6gZF7ASPDKkax3Myc4tz0zAJDQ73ixLyUzOJsveT8 3E2M4IDgjNzB+HSi+SFGJg5OqQbG0Ht/dL0K/laI8v4InZh4PPvMpve66vyXrd4rOBn+rpk3 43rRH9ZGrQ2txhrl5pM95xQLa+f9mMHj+Ka7ieuRwJ+D/OyN7Qq+cXfSko8Vi5q/vXpg3Uuv 5XP0S2xCT5rEy5tyTHDcwPzHYlZg2E3ztq6Gv2+NjP2Y19oYv5iULRDPlXPeMEOJpTgj0VCL uag4EQAthFUDuAEAAA== 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 d21611a4e90f..87efb702b1c6 100644 --- a/drivers/infiniband/ulp/srp/ib_srp.c +++ b/drivers/infiniband/ulp/srp/ib_srp.c @@ -3451,7 +3451,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); @@ -3498,6 +3498,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);