diff options
| author | Greg Kroah-Hartman <[email protected]> | 2017-10-09 07:02:35 +0000 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2017-10-09 07:02:35 +0000 |
| commit | 1236d6bb6e19fc72ffc6bbcdeb1bfefe450e54ee (patch) | |
| tree | 47da3feee8e263e8c9352c85cf518e624be3c211 /drivers/tty/serial/sccnxp.c | |
| parent | staging: irda: au1k_ir.c fix warning: Prefer [subsystem eg: netdev]_info([sub... (diff) | |
| parent | Linux 4.14-rc4 (diff) | |
| download | kernel-1236d6bb6e19fc72ffc6bbcdeb1bfefe450e54ee.tar.gz kernel-1236d6bb6e19fc72ffc6bbcdeb1bfefe450e54ee.zip | |
Merge 4.14-rc4 into staging-next
We want the staging/iio fixes in here as well to handle merge issues.
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'drivers/tty/serial/sccnxp.c')
| -rw-r--r-- | drivers/tty/serial/sccnxp.c | 13 |
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) goto err_out; uartclk = 0; } else { - clk_prepare_enable(clk); + ret = clk_prepare_enable(clk); + if (ret) + goto err_out; + + ret = devm_add_action_or_reset(&pdev->dev, + (void(*)(void *))clk_disable_unprepare, + clk); + if (ret) + goto err_out; + uartclk = clk_get_rate(clk); } @@ -988,7 +997,7 @@ static int sccnxp_probe(struct platform_device *pdev) uart_unregister_driver(&s->uart); err_out: if (!IS_ERR(s->regulator)) - return regulator_disable(s->regulator); + regulator_disable(s->regulator); return ret; } |
