Commit d7c53fb0 authored by Michael Walle's avatar Michael Walle Committed by Greg Kroah-Hartman

tty: serial: fsl_lpuart: fix return value checking

The return value of lpuart_dma_tx_request() is an negative errno on
failure and zero on success.

Fixes: 159381df ("tty: serial: fsl_lpuart: fix DMA operation when using IOMMU")
Reported-by: default avatarLeonard Crestez <leonard.crestez@nxp.com>
Signed-off-by: default avatarMichael Walle <michael@walle.cc>
Reviewed-by: default avatarFugang Duan <fugang.duan@nxp.com>
Link: https://lore.kernel.org/r/20200325090658.25967-2-michael@walle.ccSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d0e7600b
......@@ -1538,7 +1538,7 @@ static void lpuart_tx_dma_startup(struct lpuart_port *sport)
goto err;
ret = lpuart_dma_tx_request(&sport->port);
if (!ret)
if (ret)
goto err;
init_waitqueue_head(&sport->dma_wait);
......
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