diff options
author | Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com> | 2017-05-09 11:50:32 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-05-18 16:38:20 +0200 |
commit | d653c43aefedd3d22d3d2222c10f5b6ae2dfbe13 (patch) | |
tree | 7a6d95dac294ae097ae42a21ce8b7715764625aa /drivers/tty/serial/xilinx_uartps.c | |
parent | 8b7a6b2b8e379eaa7d5074ad37ab3759112923aa (diff) | |
download | linux-stable-d653c43aefedd3d22d3d2222c10f5b6ae2dfbe13.tar.gz linux-stable-d653c43aefedd3d22d3d2222c10f5b6ae2dfbe13.tar.bz2 linux-stable-d653c43aefedd3d22d3d2222c10f5b6ae2dfbe13.zip |
serial: xilinx_uartps: Fix the error path
Fix the runtime calls in the error path.
Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/xilinx_uartps.c')
-rw-r--r-- | drivers/tty/serial/xilinx_uartps.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c index c0539950f8d7..b5b77ba3ac65 100644 --- a/drivers/tty/serial/xilinx_uartps.c +++ b/drivers/tty/serial/xilinx_uartps.c @@ -1587,20 +1587,21 @@ static int cdns_uart_probe(struct platform_device *pdev) if (rc) { dev_err(&pdev->dev, "uart_add_one_port() failed; err=%i\n", rc); - goto err_out_notif_unreg; + goto err_out_pm_disable; } return 0; +err_out_pm_disable: + pm_runtime_disable(&pdev->dev); + pm_runtime_set_suspended(&pdev->dev); + pm_runtime_dont_use_autosuspend(&pdev->dev); err_out_notif_unreg: #ifdef CONFIG_COMMON_CLK clk_notifier_unregister(cdns_uart_data->uartclk, &cdns_uart_data->clk_rate_change_nb); #endif err_out_clk_disable: - pm_runtime_disable(&pdev->dev); - pm_runtime_set_suspended(&pdev->dev); - pm_runtime_dont_use_autosuspend(&pdev->dev); clk_disable_unprepare(cdns_uart_data->uartclk); err_out_clk_dis_pclk: clk_disable_unprepare(cdns_uart_data->pclk); |