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: 159381df14 ("tty: serial: fsl_lpuart: fix DMA operation when using IOMMU")
Reported-by: Leonard Crestez <leonard.crestez@nxp.com>
Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Fugang Duan <fugang.duan@nxp.com>
Link: https://lore.kernel.org/r/20200325090658.25967-2-michael@walle.cc
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Michael Walle 2020-03-25 10:06:58 +01:00 committed by Greg Kroah-Hartman
parent d0e7600b91
commit d7c53fb081
1 changed files with 1 additions and 1 deletions

View File

@ -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);