aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/sccnxp.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2017-10-10 05:30:59 -0400
committerIngo Molnar <mingo@kernel.org>2017-10-10 05:30:59 -0400
commit151aeab77738469ddbf0f9532e2fddd0d231aa2b (patch)
treecb1320931d458aeecd1d504575c62ad554a3417a /drivers/tty/serial/sccnxp.c
parent17de4ee04ca925590df036b112c1db8a778e14bf (diff)
parent024c9d2faebdad3fb43fe49ad68e91a36190f1e2 (diff)
Merge branch 'sched/urgent' into sched/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'drivers/tty/serial/sccnxp.c')
-rw-r--r--drivers/tty/serial/sccnxp.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/tty/serial/sccnxp.c b/drivers/tty/serial/sccnxp.c
index cdd2f942317c..b9c7a904c1ea 100644
--- a/drivers/tty/serial/sccnxp.c
+++ b/drivers/tty/serial/sccnxp.c
@@ -889,7 +889,16 @@ static int sccnxp_probe(struct platform_device *pdev)
889 goto err_out; 889 goto err_out;
890 uartclk = 0; 890 uartclk = 0;
891 } else { 891 } else {
892 clk_prepare_enable(clk); 892 ret = clk_prepare_enable(clk);
893 if (ret)
894 goto err_out;
895
896 ret = devm_add_action_or_reset(&pdev->dev,
897 (void(*)(void *))clk_disable_unprepare,
898 clk);
899 if (ret)
900 goto err_out;
901
893 uartclk = clk_get_rate(clk); 902 uartclk = clk_get_rate(clk);
894 } 903 }
895 904
@@ -988,7 +997,7 @@ static int sccnxp_probe(struct platform_device *pdev)
988 uart_unregister_driver(&s->uart); 997 uart_unregister_driver(&s->uart);
989err_out: 998err_out:
990 if (!IS_ERR(s->regulator)) 999 if (!IS_ERR(s->regulator))
991 return regulator_disable(s->regulator); 1000 regulator_disable(s->regulator);
992 1001
993 return ret; 1002 return ret;
994} 1003}