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: Fugang Duan <fugang.duan@nxp.com>
Link: https://lore.kernel.org/r/20190717051930.15514-4-fugang.duan@nxp.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Fugang Duan 2019-07-17 13:19:28 +08:00 committed by Greg Kroah-Hartman
parent d8a0e92e1c
commit ca8d92f6d3
1 changed files with 1 additions and 1 deletions

View File

@ -1097,7 +1097,7 @@ static inline int lpuart_start_rx_dma(struct lpuart_port *sport)
if (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)
return -ENOMEM;