linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] serial: bfin_uart: Delete an error message for a failed memory allocation in bfin_serial_probe()
@ 2017-12-09 21:11 SF Markus Elfring
  0 siblings, 0 replies; only message in thread
From: SF Markus Elfring @ 2017-12-09 21:11 UTC (permalink / raw)
  To: linux-serial, adi-buildroot-devel, Greg Kroah-Hartman, Jiri Slaby
  Cc: LKML, kernel-janitors

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 9 Dec 2017 22:05:54 +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/serial/bfin_uart.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/tty/serial/bfin_uart.c b/drivers/tty/serial/bfin_uart.c
index 4755fa696321..558f6ebc4f01 100644
--- a/drivers/tty/serial/bfin_uart.c
+++ b/drivers/tty/serial/bfin_uart.c
@@ -1221,11 +1221,9 @@ static int bfin_serial_probe(struct platform_device *pdev)
 	if (bfin_serial_ports[pdev->id] == NULL) {
 
 		uart = kzalloc(sizeof(*uart), GFP_KERNEL);
-		if (!uart) {
-			dev_err(&pdev->dev,
-				"fail to malloc bfin_serial_port\n");
+		if (!uart)
 			return -ENOMEM;
-		}
+
 		bfin_serial_ports[pdev->id] = uart;
 
 #ifdef CONFIG_EARLY_PRINTK
-- 
2.15.1

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-12-09 21:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-09 21:11 [PATCH] serial: bfin_uart: Delete an error message for a failed memory allocation in bfin_serial_probe() SF Markus Elfring

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).