From patchwork Sat Feb 18 21:10:24 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: 9581287 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 D9B3E600F6 for ; Sat, 18 Feb 2017 21:10:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CA1FF28745 for ; Sat, 18 Feb 2017 21:10:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BD0A12877A; Sat, 18 Feb 2017 21:10:41 +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 5617928745 for ; Sat, 18 Feb 2017 21:10:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753577AbdBRVKj (ORCPT ); Sat, 18 Feb 2017 16:10:39 -0500 Received: from mout.web.de ([212.227.15.4]:61253 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753343AbdBRVKi (ORCPT ); Sat, 18 Feb 2017 16:10:38 -0500 Received: from [192.168.1.2] ([77.181.107.93]) by smtp.web.de (mrweb002 [213.165.67.108]) with ESMTPSA (Nemesis) id 0M2MuC-1cOdML2e96-00s3y9; Sat, 18 Feb 2017 22:10:26 +0100 Subject: [PATCH 20/29] IB/mlx4: Delete an error message for a failed memory allocation in mlx4_ib_add() To: linux-rdma@vger.kernel.org, Doug Ledford , Hal Rosenstock , Leon Romanovsky , Matan Barak , Sean Hefty , Yishai Hadas References: <1935365a-bd7c-461e-6a84-0c5d3a501fff@users.sourceforge.net> Cc: LKML , kernel-janitors@vger.kernel.org, Wolfram Sang From: SF Markus Elfring Message-ID: Date: Sat, 18 Feb 2017 22:10:24 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: <1935365a-bd7c-461e-6a84-0c5d3a501fff@users.sourceforge.net> X-Provags-ID: V03:K0:VDqHzubOlnKiKWvL79uaDd6marH66+Oz6MlvmWPcZ6sqL811LrG 6RBwiadIsjs4BAs5Uw9H+gaT/cE5KSxPNhftRafHjllO+Xe2xrJfajRlY9WZJtCrjauzZnP QeoY/5v6gB337G4S9gS2G68zgmT0dI2Szscwll7npgRUbpq9IWEni3RLFfFm/XZ8/FzUuZ0 x5aOdCD8Ahg5wj9aFNbAw== X-UI-Out-Filterresults: notjunk:1; V01:K0:YWT6TmQgYNM=:vei63vInF4leyOB8KPE+DN Z6oMJSdZyEeACQeuLW0GCURK/BIrpgF/aLhKAZXTZR72gdt7oU7150119o5v3bzuK0/aim1lf Sm1OJ4O+7l1/ScrgFc8m22mq5+l5k5HMO+jMhw+m46X8EUjGCJKyKyg1m6pKscIX1aWAUDvqe QywiISrLy9kJNOdNcGF5pgw7jCaaz0goTkE26zOtf/V3rGrKEmvxPKZ98/dOU+iZh4y/X17n6 i33g1WRorAD6R1Juxm1tn2yGSW9+WIanlYTur7g4HNq2ngw3DFYeML99kxsRDEYAqgSi5cwFj 1SlK4OBYg55fLmjbRnCJ9HAxwfZnLHYMCOBQ2tJdcknGd87lP6QCG6hNjBfCuGX1FcYjAbzKK GOCsan4+tQtPDPub8x0JoU3t3b5K6JofYxVHWhNbsaMlMqzptcEwgRJkGbuQhrmuHWTzxiLLm JgB1ptvs+wQci9TjahF7plcFP76H2E0PxwiyVerLh8TITgpCOCVtbLO+j5YyGtaQ501s16Cnd 4zDk5mAEowl1ZjeY39TDOp8FRRxN/fkNmwNy7Ap9zxMb+hX+tsROZMEHIglfxLEg8wt8CrLg3 YgUU2lEjr+2bL0SJ/bZNh6D01xIABY+MauS78PvVEJWdnWPfWYigye1AKrzeSTCmgIboqHVR5 nR6a3E13s4M4LVMKrUrKmujZP2vp7+td37tuUMu6iK5Y1DmoXHtMGj+dH7vajqJ1zUgc1BqRy 8N3SS5ZRHdJlvf2mJtBtyQZVDccVNEIyEd94x/pMSDpKmM6wZ2NpaeMB8DyQl1F9NKHOcVq6v S0J3gvH 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: Sat, 18 Feb 2017 16:15:20 +0100 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 21b88d5ceda4..33b46c463ffa 100644 --- a/drivers/infiniband/hw/mlx4/main.c +++ b/drivers/infiniband/hw/mlx4/main.c @@ -2623,11 +2623,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;