[<prev] [next>] [day] [month] [year] [list]
Message-ID: <cceafed0-9dd5-259a-634e-b93dae57e92b@users.sourceforge.net>
Date: Fri, 12 May 2017 22:34:20 +0200
From: SF Markus Elfring <elfring@...rs.sourceforge.net>
To: linux-rdma@...r.kernel.org,
Dasaratharaman Chandramouli
<dasaratharaman.chandramouli@...el.com>,
Don Hiatt <don.hiatt@...el.com>,
Doug Ledford <dledford@...hat.com>,
Erez Shitrit <erezsh@...lanox.com>,
Feras Daoud <ferasda@...lanox.com>,
Hal Rosenstock <hal.rosenstock@...il.com>,
Ira Weiny <ira.weiny@...el.com>,
Leon Romanovsky <leon@...nel.org>,
Mark Bloch <markb@...lanox.com>,
Paolo Abeni <pabeni@...hat.com>,
Sean Hefty <sean.hefty@...el.com>,
Shamir Rabinovitch <shamir.rabinovitch@...cle.com>,
Zhu Yanjun <yanjun.zhu@...cle.com>
Cc: LKML <linux-kernel@...r.kernel.org>,
kernel-janitors@...r.kernel.org
Subject: [PATCH] IB/IPoIB: Delete an error message for a failed memory
allocation in ipoib_dev_init_default()
From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Fri, 12 May 2017 22:22:43 +0200
Omit an extra message for a memory allocation failure in this function.
This issue was detected by using the Coccinelle software.
Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf
Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
---
drivers/infiniband/ulp/ipoib/ipoib_main.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c
index 2869d1adb1de..e31237af2d57 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
@@ -1618,11 +1618,8 @@ static int ipoib_dev_init_default(struct net_device *dev)
goto out;
priv->tx_ring = vzalloc(ipoib_sendq_size * sizeof *priv->tx_ring);
- if (!priv->tx_ring) {
- printk(KERN_WARNING "%s: failed to allocate TX ring (%d entries)\n",
- priv->ca->name, ipoib_sendq_size);
+ if (!priv->tx_ring)
goto out_rx_ring_cleanup;
- }
/* priv->tx_head, tx_tail & tx_outstanding are already 0 */
--
2.12.3
Powered by blists - more mailing lists