mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: SF Markus Elfring <elfring@users.sourceforge.net>
To: netdev@vger.kernel.org,
	Augusto Mecking Caringi <augustocaringi@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Jarod Wilson <jarod@redhat.com>,
	Javier Martinez Canillas <javier@osg.samsung.com>,
	Kees Cook <keescook@chromium.org>
Cc: LKML <linux-kernel@vger.kernel.org>, kernel-janitors@vger.kernel.org
Subject: [PATCH 2/5] atm: Delete an error message for a failed memory allocation in make_entry()
Date: Sun, 21 May 2017 22:15:10 +0200	[thread overview]
Message-ID: <d87a6c4a-c4ed-38b3-97cf-29edc3590f9b@users.sourceforge.net> (raw)
In-Reply-To: <49543220-93e4-781c-877b-381277837152@users.sourceforge.net>

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sun, 21 May 2017 21:24:45 +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/atm/lec.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/net/atm/lec.c b/net/atm/lec.c
index 6ad3ca625a44..a11dbd3a5119 100644
--- a/net/atm/lec.c
+++ b/net/atm/lec.c
@@ -1556,7 +1556,6 @@ static struct lec_arp_table *make_entry(struct lec_priv *priv,
-	if (!to_return) {
-		pr_info("LEC: Arp entry kmalloc failed\n");
+	if (!to_return)
 		return NULL;
-	}
+
 	ether_addr_copy(to_return->mac_addr, mac_addr);
 	INIT_HLIST_NODE(&to_return->next);
 	setup_timer(&to_return->timer, lec_arp_expire_arp,
-- 
2.13.0

  parent reply	other threads:[~2017-05-21 20:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-21 20:12 [PATCH 0/5] atm: Adjustments for some function implementations SF Markus Elfring
2017-05-21 20:14 ` [PATCH 1/5] atm: Improve a size determination in four functions SF Markus Elfring
2017-05-21 20:15 ` SF Markus Elfring [this message]
2017-05-21 20:16 ` [PATCH 3/5] atm: Adjust 19 checks for null pointers SF Markus Elfring
2017-05-21 20:17 ` [PATCH 4/5] atm: Use seq_puts() in lec_info() SF Markus Elfring
2017-05-21 20:18 ` [PATCH 5/5] atm: Use seq_putc() " SF Markus Elfring
2017-05-23  4:32 ` [PATCH 0/5] atm: Adjustments for some function implementations Kees Cook

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d87a6c4a-c4ed-38b3-97cf-29edc3590f9b@users.sourceforge.net \
    --to=elfring@users.sourceforge.net \
    --cc=augustocaringi@gmail.com \
    --cc=davem@davemloft.net \
    --cc=jarod@redhat.com \
    --cc=javier@osg.samsung.com \
    --cc=keescook@chromium.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome