Skip to content

Commit cc9ca4d

Browse files
jonhuntergregkh
authored andcommitted
serial: tegra: Only print FIFO error message when an error occurs
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: 222dcdf ("serial: tegra: check for FIFO mode enabled status") Cc: <[email protected]> Acked-by: Thierry Reding <[email protected]> Signed-off-by: Jon Hunter <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 9a936d6 commit cc9ca4d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

drivers/tty/serial/serial-tegra.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1045,9 +1045,11 @@ static int tegra_uart_hw_init(struct tegra_uart_port *tup)
10451045

10461046
if (tup->cdata->fifo_mode_enable_status) {
10471047
ret = tegra_uart_wait_fifo_mode_enabled(tup);
1048-
dev_err(tup->uport.dev, "FIFO mode not enabled\n");
1049-
if (ret < 0)
1048+
if (ret < 0) {
1049+
dev_err(tup->uport.dev,
1050+
"Failed to enable FIFO mode: %d\n", ret);
10501051
return ret;
1052+
}
10511053
} else {
10521054
/*
10531055
* For all tegra devices (up to t210), there is a hardware

0 commit comments

Comments
 (0)