Skip to content

Commit

Permalink
tty: serial: fsl_lpuart: use dev_err_probe for clocks
Browse files Browse the repository at this point in the history
Clocks might not be available yet when probing lpuart. Silence -517 errors
by using dev_err_probe.

Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Link: https://lore.kernel.org/r/20240411130449.1096090-1-alexander.stein@ew.tq-group.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Alexander Stein authored and Greg Kroah-Hartman committed Apr 17, 2024
1 parent e533e4c commit 5cb90c6
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/tty/serial/fsl_lpuart.c
Original file line number Diff line number Diff line change
Expand Up @@ -2879,17 +2879,15 @@ static int lpuart_probe(struct platform_device *pdev)
sport->ipg_clk = devm_clk_get(&pdev->dev, "ipg");
if (IS_ERR(sport->ipg_clk)) {
ret = PTR_ERR(sport->ipg_clk);
dev_err(&pdev->dev, "failed to get uart ipg clk: %d\n", ret);
return ret;
return dev_err_probe(&pdev->dev, ret, "failed to get uart ipg clk\n");
}

sport->baud_clk = NULL;
if (is_imx8qxp_lpuart(sport)) {
sport->baud_clk = devm_clk_get(&pdev->dev, "baud");
if (IS_ERR(sport->baud_clk)) {
ret = PTR_ERR(sport->baud_clk);
dev_err(&pdev->dev, "failed to get uart baud clk: %d\n", ret);
return ret;
return dev_err_probe(&pdev->dev, ret, "failed to get uart baud clk\n");
}
}

Expand Down

0 comments on commit 5cb90c6

Please sign in to comment.