Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753569AbdCHN31 (ORCPT ); Wed, 8 Mar 2017 08:29:27 -0500 Received: from mout.web.de ([212.227.17.12]:57640 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753395AbdCHN3P (ORCPT ); Wed, 8 Mar 2017 08:29:15 -0500 Subject: [PATCH 15/26] IB/ocrdma: Delete an error message for a failed memory allocation in ocrdma_add() To: linux-rdma@vger.kernel.org, Devesh Sharma , Doug Ledford , Hal Rosenstock , Sean Hefty , Selvin Xavier References: Cc: LKML , kernel-janitors@vger.kernel.org, Wolfram Sang From: SF Markus Elfring Message-ID: <20d97719-3d3a-62f6-a249-f39cf528c5e9@users.sourceforge.net> Date: Wed, 8 Mar 2017 14:13:11 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:oHd731JgU78y4RmfmVlSL/BG4V+tGa48okTzMOs+QIuCAy2I5zW mhGjeWsyKn5hHaG7GkkzSP4ry6Se/WtXfJgzSyAGHOdWVU7TtyU2Yupjyi2rA19/UH/u2XO 8IM6JxfL6U/W0plOIWf9RMc5iLrrQ2G27LohnVbQe05vYRlION9JKM9f+kL7u6HBbcdsSkN UsVQ48S2RgYDZNH/TTA6g== X-UI-Out-Filterresults: notjunk:1;V01:K0:HzAEctbsn0I=:bGy3JluMpdGq9medelf0Bf 5H1xNIxF0cWIEZzYCxyeNMMpqg4ErJmT8iwcsBSyvOu9u5+ZXhvke+3Ay//J06oBqZmkK/dl/ 6SX8AeQdJj3mKY4+ihvZ73abjhKr53sub2hGrxD3nIeB2FFQKlSbatjuL+anmVc6Yw3HvqGoH ctLmGaRReh93+MgnYWwMrLKzMxZ+dOjDGE2Jse+sPtJd31gxnMdzapTwjKBqeEZAo4dBUZnr3 qphVPKzEWg9iEfpDYkNIQ6absmmVpRb1XK7nP4u8J6+dyE37PX+Uw0uEKUE+MKR2c8Sa783vd W+pai51pgnQZv/jhsB+zHFsvqt+qloisc4FGJsuDDZNPu9juOSVkkU8QMugWSee9J6CAvbZlE PbKOT6zu3whFyvzOprTc6ENmpNL7InT7A9n/pul6XdCT9uBBPrhrozXkFG+/7op0At7yCgnpV qyCG/RRuYT9nWsVn8xH4V5uXnlYEaEIQnW99inmFmtyiRYLgiN4NiBLJu/pxx5wZ89TiuiEkD fCH38E0XPxApvIFme0X5lAxzxJlRI7n5MbNmJwoJ/zirkyKwJGYTYpIyjMbMUgUqOufZ3gyZ/ W6hVsXNEHU+aBIGzecg0kq/EEw8x5CkMntPIj1U2TQOtziJ0LW2ClRqv/LMap+d34QnmqMZUE jNVeQ4+pmj8mj7/41enTU2orZhS4KKmOCSy2VFt9uVD5TXLgdQBF+mem7GHxjy1Vs6o2pc5k0 npCXUTnlcpmj8NrCSIcqJsWKc96ybTJWc3b1yAkZROHug1yPpa9cr/B6nJdbqVzDt9tWKpd8u HO5Q1Qc Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1065 Lines: 30 From: Markus Elfring Date: Tue, 7 Mar 2017 22:23:17 +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/ocrdma/ocrdma_main.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_main.c b/drivers/infiniband/hw/ocrdma/ocrdma_main.c index c49b4491d4e7..93113feeb2d5 100644 --- a/drivers/infiniband/hw/ocrdma/ocrdma_main.c +++ b/drivers/infiniband/hw/ocrdma/ocrdma_main.c @@ -304,10 +304,9 @@ static struct ocrdma_dev *ocrdma_add(struct be_dev_info *dev_info) struct ocrdma_dev *dev; dev = (struct ocrdma_dev *)ib_alloc_device(sizeof(*dev)); - if (!dev) { - pr_err("Unable to allocate ib device\n"); + if (!dev) return NULL; - } + dev->mbx_cmd = kzalloc(sizeof(struct ocrdma_mqe_emb_cmd), GFP_KERNEL); if (!dev->mbx_cmd) goto idr_err; -- 2.12.0