serial: fsl_lpuart: Remove unneeded OOM error message
authorFabio Estevam <festevam@gmail.com>
Tue, 11 Jun 2019 13:03:39 +0000 (10:03 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 18 Jun 2019 07:34:28 +0000 (09:34 +0200)
There is no need to add an out-of-memory error message inside
the driver because the core MM code will take care of it.

Remove the unneeded OOM error message.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/fsl_lpuart.c

index 08b52cca650cef4a7a41293779b3831ead91fdcb..2f24d9796d20dfb77b0ef135039f050baa84000b 100644 (file)
@@ -1040,10 +1040,8 @@ static inline int lpuart_start_rx_dma(struct lpuart_port *sport)
                sport->rx_dma_rng_buf_len = 16;
 
        ring->buf = kmalloc(sport->rx_dma_rng_buf_len, GFP_ATOMIC);
-       if (!ring->buf) {
-               dev_err(sport->port.dev, "Ring buf alloc failed\n");
+       if (!ring->buf)
                return -ENOMEM;
-       }
 
        sg_init_one(&sport->rx_sgl, ring->buf, sport->rx_dma_rng_buf_len);
        sg_set_buf(&sport->rx_sgl, ring->buf, sport->rx_dma_rng_buf_len);