Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1423894AbdDUSrV (ORCPT ); Fri, 21 Apr 2017 14:47:21 -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 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-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit 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-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 945 Lines: 30 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; -- 2.12.2