summaryrefslogtreecommitdiff
path: root/drivers/tty
diff options
context:
space:
mode:
authorMichael Walle <michael@walle.cc>2020-03-25 10:06:58 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-03-26 15:34:05 +0100
commitd7c53fb081c6347675bcd6fc4a9306111c42c111 (patch)
treeec943b76880598a53f207fbd5dd11d0f023a96b6 /drivers/tty
parentd0e7600b914c9fd4935fe6dabf0cd5d71cb94347 (diff)
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: 159381df1442f ("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>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/fsl_lpuart.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c
index 131018979b77..5d41075964f2 100644
--- a/drivers/tty/serial/fsl_lpuart.c
+++ b/drivers/tty/serial/fsl_lpuart.c
@@ -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);