Commit ca8d92f6 authored by Fugang Duan's avatar Fugang Duan Committed by Greg Kroah-Hartman

tty: serial: fsl_lpuart: use kzalloc() instead of kmalloc()

Use kzalloc() instead of kmalloc() to get clean rx buffer
that is useful for DMA mode debug to check the data moving
validity.
Signed-off-by: default avatarFugang Duan <fugang.duan@nxp.com>
Link: https://lore.kernel.org/r/20190717051930.15514-4-fugang.duan@nxp.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d8a0e92e
...@@ -1097,7 +1097,7 @@ static inline int lpuart_start_rx_dma(struct lpuart_port *sport) ...@@ -1097,7 +1097,7 @@ static inline int lpuart_start_rx_dma(struct lpuart_port *sport)
if (sport->rx_dma_rng_buf_len < 16) if (sport->rx_dma_rng_buf_len < 16)
sport->rx_dma_rng_buf_len = 16; sport->rx_dma_rng_buf_len = 16;
ring->buf = kmalloc(sport->rx_dma_rng_buf_len, GFP_ATOMIC); ring->buf = kzalloc(sport->rx_dma_rng_buf_len, GFP_ATOMIC);
if (!ring->buf) if (!ring->buf)
return -ENOMEM; return -ENOMEM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment