lkml.org 
[lkml]   [2017]   [May]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH 1/3] RDS: IB: Delete an error message for a failed memory allocation in rds_ib_add_one()
From
Date
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Mon, 22 May 2017 15:34:28 +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@users.sourceforge.net>
---
net/rds/ib.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/net/rds/ib.c b/net/rds/ib.c
index 7a64c8db81ab..c5514d058171 100644
--- a/net/rds/ib.c
+++ b/net/rds/ib.c
@@ -166,8 +166,5 @@ static void rds_ib_add_one(struct ib_device *device)
- if (!rds_ibdev->vector_load) {
- pr_err("RDS/IB: %s failed to allocate vector memory\n",
- __func__);
+ if (!rds_ibdev->vector_load)
goto put_dev;
- }

rds_ibdev->dev = device;
rds_ibdev->pd = ib_alloc_pd(device, 0);
--
2.13.0
\
 
 \ /
  Last update: 2017-05-22 16:12    [W:0.482 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site