netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] connector: Delete an error message for a failed memory allocation in cn_queue_alloc_callback_entry()
@ 2017-08-27 19:25 SF Markus Elfring
  2017-08-27 23:16 ` Waskiewicz Jr, Peter
  2017-09-05 13:10 ` [PATCH] " Evgeniy Polyakov
  0 siblings, 2 replies; 6+ messages in thread
From: SF Markus Elfring @ 2017-08-27 19:25 UTC (permalink / raw)
  To: netdev, Evgeniy Polyakov; +Cc: LKML, kernel-janitors

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sun, 27 Aug 2017 21:18:37 +0200

Omit an extra message for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/connector/cn_queue.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/connector/cn_queue.c b/drivers/connector/cn_queue.c
index 1f8bf054d11c..e4f31d679f02 100644
--- a/drivers/connector/cn_queue.c
+++ b/drivers/connector/cn_queue.c
@@ -40,10 +40,8 @@ cn_queue_alloc_callback_entry(struct cn_queue_dev *dev, const char *name,
 	struct cn_callback_entry *cbq;
 
 	cbq = kzalloc(sizeof(*cbq), GFP_KERNEL);
-	if (!cbq) {
-		pr_err("Failed to create new callback queue.\n");
+	if (!cbq)
 		return NULL;
-	}
 
 	atomic_set(&cbq->refcnt, 1);
 
-- 
2.14.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-09-05 13:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-27 19:25 [PATCH] connector: Delete an error message for a failed memory allocation in cn_queue_alloc_callback_entry() SF Markus Elfring
2017-08-27 23:16 ` Waskiewicz Jr, Peter
2017-08-28  6:05   ` Dan Carpenter
2017-08-28 14:05     ` Waskiewicz Jr, Peter
2017-08-28  7:09   ` SF Markus Elfring
2017-09-05 13:10 ` [PATCH] " Evgeniy Polyakov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).