From patchwork Fri Apr 21 18:46:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 9693493 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 606D1601D4 for ; Fri, 21 Apr 2017 18:48:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 555C42864A for ; Fri, 21 Apr 2017 18:48:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 49C2C2865B; Fri, 21 Apr 2017 18:48:47 +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 D3CD92864A for ; Fri, 21 Apr 2017 18:48:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1423873AbdDUSrT (ORCPT ); Fri, 21 Apr 2017 14:47:19 -0400 Received: from mout.web.de ([212.227.15.3]:63052 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1423870AbdDUSrP (ORCPT ); Fri, 21 Apr 2017 14:47:15 -0400 Received: from [192.168.1.2] ([77.182.39.184]) by smtp.web.de (mrweb002 [213.165.67.108]) with ESMTPSA (Nemesis) id 0MGiLB-1cojHf1mhF-00Daqr; Fri, 21 Apr 2017 20:46:50 +0200 Subject: [PATCH v2 13/17] IB/mlx4: Delete an error message for a failed memory allocation in mlx4_ib_add() From: SF Markus Elfring To: Doug Ledford , Hal Rosenstock , Leon Romanovsky , Majd Dibbiny , Matan Barak , Sean Hefty , Yishai Hadas , linux-rdma@vger.kernel.org Cc: LKML , kernel-janitors@vger.kernel.org, Wolfram Sang References: <1935365a-bd7c-461e-6a84-0c5d3a501fff@users.sourceforge.net> <1492720654.3041.16.camel@redhat.com> Message-ID: Date: Fri, 21 Apr 2017 20:46:48 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.0.1 MIME-Version: 1.0 In-Reply-To: Content-Language: en-GB X-Provags-ID: V03:K0:BpJNjz+AcCeIbn+OjX7SFTYr+hPmVt4yy1oN8UiYM447yu5DgT3 SmoljK0mSAyvGASkssqmhd3zTohiGJZ1bQsUyYdZLzvefOInxj9RFirVT3XZBDEKHwTEfeX Gr53notu8FlnG1YnZjzlxDF8wJucOHfinLpMnkEw50Qs6OaTXkIFNUe0MQgf+8wwgblBZI4 JaHCTkODo+tEYoipipkuQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:mnouCBcjbpc=:uqhkNR794cdhNEmE/ksokq 7NGbhD80vIPlowXbL9D6/hG642OVoRo2nsprTm51iiCxO0LhA9W+YgDi7zjBpPPCIT8YOzEGt Ih2pT8izHiMvoj1AxUGQu4MSr1rJQ/mndKeb42lpYUflra6dI1Kq7jSZt8UCy3kXWKqCZgTsp XEHGZQPUYTM2xTeH3gL3rCwcV9LZNN6a9EWiXOMdtvARXlVB9w+bNpdgceyOp5epXhvEJSLCa v09RQ2cBeQp4q6qMAzVB10Jik3h/kdkIWmolok9tRJLwQGyFYE6yf+6zUpzGXSfCK9Jz/FkaD LhDeKAvEuFuh4DlhEo6+SRN85lh4kmSLDmqElmu+3JodRebAKu05z7m/8ZPcUazs+5g42Tmmb DwB0tX7MgBhrPQBpcxyjhoEEY5lSfJ33bgfADRM3rrYxdnRrxoIUNIaVZDKPoog8VaL4w3a6j U/7NUdwUvf2eAexovPgswvajXpFr8eBjKWgKVURDfqFr8aQk3VU2U15uJVH3WVYeMqc+LmiSh D6Z3sQ4KSGuP5sTe5/mHCUz1+AOXKn7FBYZtXQW+d5MQuycBDIc0lXUkKTgpHnPmgoWUEr9GL vkYgAoOFQwFYl7/mOnbjsC3Uc2cY0kERYjTP3r/vrJX9uQ+tdH1qUlDnKHwmyha3BU5a8q13v Wt81/efvNLNmuwU2diFiHl1wtC93wt8+cqxLY5fcRarW/xumfrXig/eJoTSo4c5GPTrzI999C on8aleqvvKgrg/lzBTumh++4PLLh83ykB+MVfvvAbND2WffDujFnrZoP9T3ROLRSVK7E8NuZw Pwn/HdQ 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 From: Markus Elfring Date: Fri, 21 Apr 2017 18:55:35 +0200 Omit an extra message for a memory allocation failure in this function. Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf Signed-off-by: Markus Elfring --- drivers/infiniband/hw/mlx4/main.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/infiniband/hw/mlx4/main.c b/drivers/infiniband/hw/mlx4/main.c index 4eb2466530dc..67368dea9b6a 100644 --- a/drivers/infiniband/hw/mlx4/main.c +++ b/drivers/infiniband/hw/mlx4/main.c @@ -2626,11 +2626,8 @@ static void *mlx4_ib_add(struct mlx4_dev *dev) return NULL; ibdev = (struct mlx4_ib_dev *) ib_alloc_device(sizeof(*ibdev)); - if (!ibdev) { - dev_err(&dev->persist->pdev->dev, - "Device struct alloc failed\n"); + if (!ibdev) return NULL; - } iboe = &ibdev->iboe;