[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2378ba53-4894-e532-7523-b578e42c8eb2@users.sourceforge.net>
Date: Fri, 8 Dec 2017 19:09:26 +0100
From: SF Markus Elfring <elfring@...rs.sourceforge.net>
To: linux-serial@...r.kernel.org,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jiri Slaby <jslaby@...e.com>
Cc: LKML <linux-kernel@...r.kernel.org>,
kernel-janitors@...r.kernel.org
Subject: [PATCH 1/4] serial: pch_uart: Delete an error message for a failed
memory allocation in dma_handle_tx()
From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Fri, 8 Dec 2017 18:28:20 +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@...rs.sourceforge.net>
---
drivers/tty/serial/pch_uart.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/tty/serial/pch_uart.c b/drivers/tty/serial/pch_uart.c
index 760d5dd0aada..0fc72c491c9b 100644
--- a/drivers/tty/serial/pch_uart.c
+++ b/drivers/tty/serial/pch_uart.c
@@ -992,10 +992,8 @@ static unsigned int dma_handle_tx(struct eg20t_port *priv)
priv->tx_dma_use = 1;
priv->sg_tx_p = kzalloc(sizeof(struct scatterlist)*num, GFP_ATOMIC);
- if (!priv->sg_tx_p) {
- dev_err(priv->port.dev, "%s:kzalloc Failed\n", __func__);
+ if (!priv->sg_tx_p)
return 0;
- }
sg_init_table(priv->sg_tx_p, num); /* Initialize SG table */
sg = priv->sg_tx_p;
--
2.15.1
Powered by blists - more mailing lists