Skip to content

Commit

Permalink
serial: tegra: Don't print error on probe deferral
Browse files Browse the repository at this point in the history
If the Tegra serial driver is probe before clocks are available then the
following error is seen on boot:

 serial-tegra 3100000.serial: Couldn't get the clock

This has been observed on Jetson AGX Orin. Fix this by calling
dev_err_probe() instead of dev_err() to avoid printing an error on probe
deferral.

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/20230703113759.75608-1-jonathanh@nvidia.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Jon Hunter authored and Greg Kroah-Hartman committed Jul 25, 2023
1 parent 29e5c44 commit ad4484a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/tty/serial/serial-tegra.c
Original file line number Diff line number Diff line change
Expand Up @@ -1589,10 +1589,8 @@ static int tegra_uart_probe(struct platform_device *pdev)
return PTR_ERR(u->membase);

tup->uart_clk = devm_clk_get(&pdev->dev, NULL);
if (IS_ERR(tup->uart_clk)) {
dev_err(&pdev->dev, "Couldn't get the clock\n");
return PTR_ERR(tup->uart_clk);
}
if (IS_ERR(tup->uart_clk))
return dev_err_probe(&pdev->dev, PTR_ERR(tup->uart_clk), "Couldn't get the clock");

tup->rst = devm_reset_control_get_exclusive(&pdev->dev, "serial");
if (IS_ERR(tup->rst)) {
Expand Down

0 comments on commit ad4484a

Please sign in to comment.