summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Hunter <jonathanh@nvidia.com>2021-06-30 13:56:43 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-01-18 11:30:57 +0100
commit12dd105b3c86e48d3e5f8e0e35b361671a36abde (patch)
treee5a1edbcbba8ad2587506b5da56832889ff601e0
parentd2f24ad71fa409c9a7058232e6e0bc55742d6487 (diff)
downloadlinux-12dd105b3c86e48d3e5f8e0e35b361671a36abde.tar.gz
linux-12dd105b3c86e48d3e5f8e0e35b361671a36abde.tar.bz2
linux-12dd105b3c86e48d3e5f8e0e35b361671a36abde.zip
serial: tegra: Only print FIFO error message when an error occurs
commit cc9ca4d95846cbbece48d9cd385550f8fba6a3c1 upstream. The Tegra serial driver always prints an error message when enabling the FIFO for devices that have support for checking the FIFO enable status. Fix this by displaying the error message, only when an error occurs. Finally, update the error message to make it clear that enabling the FIFO failed and display the error code. Fixes: 222dcdff3405 ("serial: tegra: check for FIFO mode enabled status") Cc: <stable@vger.kernel.org> Acked-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Link: https://lore.kernel.org/r/20210630125643.264264-1-jonathanh@nvidia.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/tty/serial/serial-tegra.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/tty/serial/serial-tegra.c b/drivers/tty/serial/serial-tegra.c
index 47c00767aeab..75b71da2c229 100644
--- a/drivers/tty/serial/serial-tegra.c
+++ b/drivers/tty/serial/serial-tegra.c
@@ -991,9 +991,11 @@ static int tegra_uart_hw_init(struct tegra_uart_port *tup)
if (tup->cdata->fifo_mode_enable_status) {
ret = tegra_uart_wait_fifo_mode_enabled(tup);
- dev_err(tup->uport.dev, "FIFO mode not enabled\n");
- if (ret < 0)
+ if (ret < 0) {
+ dev_err(tup->uport.dev,
+ "Failed to enable FIFO mode: %d\n", ret);
return ret;
+ }
} else {
/*
* For all tegra devices (up to t210), there is a hardware