public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
From: SF Markus Elfring <elfring@users.sourceforge.net>
To: netdev@vger.kernel.org, Evgeniy Polyakov <zbr@ioremap.net>
Cc: LKML <linux-kernel@vger.kernel.org>, kernel-janitors@vger.kernel.org
Subject: [PATCH] connector: Delete an error message for a failed memory allocation in cn_queue_alloc_callback
Date: Sun, 27 Aug 2017 19:25:35 +0000	[thread overview]
Message-ID: <7b206228-b3e9-5cb9-873c-75b5d8aae23b@users.sourceforge.net> (raw)

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


             reply	other threads:[~2017-08-27 19:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-27 19:25 SF Markus Elfring [this message]
2017-08-27 23:16 ` [PATCH] connector: Delete an error message for a failed memory allocation in cn_queue_alloc_call Waskiewicz Jr, Peter
2017-08-28  6:05   ` Dan Carpenter
2017-08-28 14:05     ` Waskiewicz Jr, Peter
2017-08-28  7:09   ` connector: Delete an error message for a failed memory allocation in cn_queue_alloc_callback_ent SF Markus Elfring
2017-09-05 13:10 ` [PATCH] connector: Delete an error message for a failed memory allocation in cn_queue_alloc_call Evgeniy Polyakov

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=7b206228-b3e9-5cb9-873c-75b5d8aae23b@users.sourceforge.net \
    --to=elfring@users.sourceforge.net \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=zbr@ioremap.net \
    /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