Skip to contentSkip to conversation

serial: tegra: Don't print error on probe deferral

PATCH In review Jon Hunter 2 participants 2 messages Jul 3, 2023

Subsystems (3)
lore
Share & tools
lore

Jon Hunter

author maintainer
#0 lore raw

PATCH 1/1 serial: tegra: Don't print error on probe deferral

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.

Fixes e9ea096dd225 ("serial: tegra: add serial driver")
---
 drivers/tty/serial/serial-tegra.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/tty/serial/serial-tegra.c +2 -4
index 1cf08b33456c..848ea53a26bd 100644
@@ -1591,10 +1591,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)) {
Signature · 1 line
2.34.1
Acked-by on v1 1/1
#1 lore raw
Quoted 9 lines · Jon Hunter

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.

Quoted 5 lines
Fixes e9ea096dd225 ("serial: tegra: add serial driver")
---
 drivers/tty/serial/serial-tegra.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

Patch looks good to me, though I'm not sure the Fixes: tag is useful. It points to a commit that is 10 years old and the error message is probably not worth backporting to every single actively maintained stable release. I'm not sure it's worth backporting at all because it's purely cosmetic.

That's up to Greg and Jiri, so from the Tegra side: