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>
goto err;
ret = lpuart_dma_tx_request(&sport->port);
- if (!ret)
+ if (ret)
goto err;
init_waitqueue_head(&sport->dma_wait);