diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-12-06 12:47:22 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-12-06 12:47:22 +0100 |
commit | 82ca0d5487d4e1444b05d9f73757b395c1228bba (patch) | |
tree | af9791936edd20ef71a1afc152f592cae4d7c60f /drivers/tty/serial/xilinx_uartps.c | |
parent | 2f588cee24caf01c1ac08fff90d67c6af555e7c7 (diff) | |
download | linux-stable-82ca0d5487d4e1444b05d9f73757b395c1228bba.tar.gz linux-stable-82ca0d5487d4e1444b05d9f73757b395c1228bba.tar.bz2 linux-stable-82ca0d5487d4e1444b05d9f73757b395c1228bba.zip |
Revert "tty: xilinx_uartps: Correct return value in probe"
This reverts commit eca42d4cf3c591c36312c52707e0a712e0c7256a.
During review it was rejected, so drop it from the tree.
Cc: Rajan Vaja <RAJANV@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 | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c index 4f8edb1661cb..379242b96790 100644 --- a/drivers/tty/serial/xilinx_uartps.c +++ b/drivers/tty/serial/xilinx_uartps.c @@ -1545,25 +1545,27 @@ static int cdns_uart_probe(struct platform_device *pdev) } cdns_uart_data->pclk = devm_clk_get(&pdev->dev, "pclk"); - if (PTR_ERR(cdns_uart_data->pclk) == -EPROBE_DEFER) - return PTR_ERR(cdns_uart_data->pclk); - if (IS_ERR(cdns_uart_data->pclk)) { cdns_uart_data->pclk = devm_clk_get(&pdev->dev, "aper_clk"); - if (IS_ERR(cdns_uart_data->pclk)) - return PTR_ERR(cdns_uart_data->pclk); - dev_err(&pdev->dev, "clock name 'aper_clk' is deprecated.\n"); + if (!IS_ERR(cdns_uart_data->pclk)) + dev_err(&pdev->dev, "clock name 'aper_clk' is deprecated.\n"); + } + if (IS_ERR(cdns_uart_data->pclk)) { + dev_err(&pdev->dev, "pclk clock not found.\n"); + rc = PTR_ERR(cdns_uart_data->pclk); + goto err_out_unregister_driver; } cdns_uart_data->uartclk = devm_clk_get(&pdev->dev, "uart_clk"); - if (PTR_ERR(cdns_uart_data->uartclk) == -EPROBE_DEFER) - return PTR_ERR(cdns_uart_data->uartclk); - if (IS_ERR(cdns_uart_data->uartclk)) { cdns_uart_data->uartclk = devm_clk_get(&pdev->dev, "ref_clk"); - if (IS_ERR(cdns_uart_data->uartclk)) - return PTR_ERR(cdns_uart_data->uartclk); - dev_err(&pdev->dev, "clock name 'ref_clk' is deprecated.\n"); + if (!IS_ERR(cdns_uart_data->uartclk)) + dev_err(&pdev->dev, "clock name 'ref_clk' is deprecated.\n"); + } + if (IS_ERR(cdns_uart_data->uartclk)) { + dev_err(&pdev->dev, "uart_clk clock not found.\n"); + rc = PTR_ERR(cdns_uart_data->uartclk); + goto err_out_unregister_driver; } rc = clk_prepare_enable(cdns_uart_data->pclk); |