mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: SF Markus Elfring <elfring@users.sourceforge.net>
To: kernel-janitors@vger.kernel.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jiri Slaby <jslaby@suse.com>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH 1/2] tty: moxa: Delete an error message for a failed memory allocation in moxa_init_board()
Date: Sun, 10 Dec 2017 16:31:18 +0100	[thread overview]
Message-ID: <d3ecae07-042f-ad07-9ecf-73e67e9b3282@users.sourceforge.net> (raw)
In-Reply-To: <7d1badbd-8bb1-4109-5c40-1ba1f226a2b1@users.sourceforge.net>

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sun, 10 Dec 2017 16:03:21 +0100

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/tty/moxa.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/tty/moxa.c b/drivers/tty/moxa.c
index 65a70f3c7cde..a74caf05cf57 100644
--- a/drivers/tty/moxa.c
+++ b/drivers/tty/moxa.c
@@ -836,7 +836,6 @@ static int moxa_init_board(struct moxa_board_conf *brd, struct device *dev)
 	brd->ports = kcalloc(MAX_PORTS_PER_BOARD, sizeof(*brd->ports),
 			GFP_KERNEL);
 	if (brd->ports == NULL) {
-		printk(KERN_ERR "cannot allocate memory for ports\n");
 		ret = -ENOMEM;
 		goto err;
 	}
-- 
2.15.1

  reply	other threads:[~2017-12-10 15:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-10 15:30 [PATCH 0/2] tty-MOXA: Adjustments for moxa_init_board() SF Markus Elfring
2017-12-10 15:31 ` SF Markus Elfring [this message]
2017-12-10 15:32 ` [PATCH 2/2] tty: moxa: Return directly after a failed kcalloc() in moxa_init_board() SF Markus Elfring

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=d3ecae07-042f-ad07-9ecf-73e67e9b3282@users.sourceforge.net \
    --to=elfring@users.sourceforge.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@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