[PATCH 2/9] IB/IPoIB: Delete an error message for a failed memory allocation

SF Markus Elfring
2017-04-07T21:00:05Z

Date: Fri, 7 Apr 2017 19:23:55 +0200

The script "checkpatch.pl" pointed information out like the following.

WARNING: Possible unnecessary 'out of memory' message

Thus remove such a statement here.

Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf
Signed-off-by: Markus Elfring <elfring@users.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 3d3e49fb15b7..c5024c6d38e7 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
@@ -1634,11 +1634,8 @@ int ipoib_dev_init(struct net_device *dev, struct ib_device *ca, int port)
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",
- 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.2