Skip to content

Commit

Permalink
serial: 8250_tegra: Fix an error handling path in tegra_uart_probe()
Browse files Browse the repository at this point in the history
commit 134f49d upstream.

If an error occurs after reset_control_deassert(), it must be re-asserted,
as already done in the .remove() function.

Fixes: c6825c6 ("serial: 8250_tegra: Create Tegra specific 8250 driver")
Cc: stable <stable@kernel.org>
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/f8130f35339cc80edc6b9aac4bb2a60b60a226bf.1684063511.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
tititiou36 authored and gregkh committed Jun 9, 2023
1 parent 3270095 commit 7493392
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/tty/serial/8250/8250_tegra.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,15 @@ static int tegra_uart_probe(struct platform_device *pdev)

ret = serial8250_register_8250_port(&port8250);
if (ret < 0)
goto err_clkdisable;
goto err_ctrl_assert;

platform_set_drvdata(pdev, uart);
uart->line = ret;

return 0;

err_ctrl_assert:
reset_control_assert(uart->rst);
err_clkdisable:
clk_disable_unprepare(uart->clk);

Expand Down

0 comments on commit 7493392

Please sign in to comment.