[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <19b7151b-ce0d-54a9-c079-4d17c31c2339@users.sourceforge.net>
Date: Mon, 22 May 2017 11:13:49 +0200
From: SF Markus Elfring <elfring@...rs.sourceforge.net>
To: netdev@...r.kernel.org, Alexey Dobriyan <adobriyan@...il.com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Florian Westphal <fw@...len.de>,
Günter Röck <linux@...ck-us.net>,
John Fastabend <john.fastabend@...il.com>,
Paolo Abeni <pabeni@...hat.com>,
Willem de Bruijn <willemb@...gle.com>
Cc: LKML <linux-kernel@...r.kernel.org>,
kernel-janitors@...r.kernel.org
Subject: [PATCH 2/3] net: pktgen: Delete an error message for a failed memory
allocation in pktgen_create_thread()
From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Mon, 22 May 2017 10:38:46 +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>
---
net/core/pktgen.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/net/core/pktgen.c b/net/core/pktgen.c
index c89f4ad21187..51008ddc7af6 100644
--- a/net/core/pktgen.c
+++ b/net/core/pktgen.c
@@ -3760,7 +3760,5 @@ static int __net_init pktgen_create_thread(int cpu, struct pktgen_net *pn)
- if (!t) {
- pr_err("ERROR: out of memory, can't create new thread\n");
+ if (!t)
return -ENOMEM;
- }
mutex_init(&t->if_lock);
t->cpu = cpu;
--
2.13.0
Powered by blists - more mailing lists