summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2021-04-29 09:19:22 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-05-13 16:26:16 +0200
commitd7e325aaa8c3593b5a572b583ecad79e95f32e7f (patch)
treeda38988394dc104a67384645fc6e5941c025ba23
parentserial: 8250: Add an empty line and remove some useless {} (diff)
downloadlinux-d7e325aaa8c3593b5a572b583ecad79e95f32e7f.tar.xz
linux-d7e325aaa8c3593b5a572b583ecad79e95f32e7f.zip
serial: 8250_omap: fix a timeout loop condition
This loop ends on -1 so the error message will never be printed. Fixes: 4bcf59a5dea0 ("serial: 8250: 8250_omap: Account for data in flight during DMA teardown") Reviewed-by: Alexander Sverdlin <alexander.sverdlin@gmail.com> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/YIpd+kOpXKMpEXPf@mwanda Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/tty/serial/8250/8250_omap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/tty/serial/8250/8250_omap.c b/drivers/tty/serial/8250/8250_omap.c
index 8ac11eaeca51..c06631ced414 100644
--- a/drivers/tty/serial/8250/8250_omap.c
+++ b/drivers/tty/serial/8250/8250_omap.c
@@ -813,7 +813,7 @@ static void __dma_rx_do_complete(struct uart_8250_port *p)
poll_count--)
cpu_relax();
- if (!poll_count)
+ if (poll_count == -1)
dev_err(p->port.dev, "teardown incomplete\n");
}
}