]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
serial: 8250_dw: Check the data->pclk when get apb_pclk
authorKefeng Wang <wangkefeng.wang@huawei.com>
Wed, 24 Aug 2016 08:33:33 +0000 (16:33 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 31 Aug 2016 13:43:52 +0000 (15:43 +0200)
It should check the data->pclk, not data->clk when get apb_pclk.

Fixes: c8ed99d4f6a8("serial: 8250_dw: Add support for deferred probing")
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Tested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/8250/8250_dw.c

index e19969614203580a6f840d79e1d779dacde663d6..b022f5a01e637f47686923ff9853d46589c5a878 100644 (file)
@@ -462,7 +462,7 @@ static int dw8250_probe(struct platform_device *pdev)
        }
 
        data->pclk = devm_clk_get(&pdev->dev, "apb_pclk");
-       if (IS_ERR(data->clk) && PTR_ERR(data->clk) == -EPROBE_DEFER) {
+       if (IS_ERR(data->pclk) && PTR_ERR(data->pclk) == -EPROBE_DEFER) {
                err = -EPROBE_DEFER;
                goto err_clk;
        }