From patchwork Wed Aug 24 08:33:33 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 74566 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp195462qga; Wed, 24 Aug 2016 01:30:57 -0700 (PDT) X-Received: by 10.66.162.4 with SMTP id xw4mr3307309pab.97.1472027457348; Wed, 24 Aug 2016 01:30:57 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m22si8604952pfg.0.2016.08.24.01.30.56; Wed, 24 Aug 2016 01:30:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754912AbcHXIan (ORCPT + 27 others); Wed, 24 Aug 2016 04:30:43 -0400 Received: from szxga02-in.huawei.com ([119.145.14.65]:47023 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754739AbcHXIal (ORCPT ); Wed, 24 Aug 2016 04:30:41 -0400 Received: from 172.24.1.47 (EHLO SZXEML429-HUB.china.huawei.com) ([172.24.1.47]) by szxrg02-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id DMC37295; Wed, 24 Aug 2016 16:28:03 +0800 (CST) Received: from localhost.localdomain (10.175.100.166) by SZXEML429-HUB.china.huawei.com (10.82.67.184) with Microsoft SMTP Server id 14.3.235.1; Wed, 24 Aug 2016 16:27:51 +0800 From: Kefeng Wang To: Greg Kroah-Hartman CC: Chen-Yu Tsai , Jiri Slaby , "Andy Shevchenko" , Heikki Krogerus , , , , Kefeng Wang Subject: [PATCH] serial: 8250_dw: Check the data->pclk when get apb_pclk Date: Wed, 24 Aug 2016 16:33:33 +0800 Message-ID: <1472027613-6337-1-git-send-email-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 2.6.0.GIT MIME-Version: 1.0 X-Originating-IP: [10.175.100.166] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A0B0206.57BD5A95.0142, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=0.0.0.0, so=2013-06-18 04:22:30, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 4ec59f049af3568bf069751cfcf6fac1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- drivers/tty/serial/8250/8250_dw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.6.0.GIT diff --git a/drivers/tty/serial/8250/8250_dw.c b/drivers/tty/serial/8250/8250_dw.c index e199696..b022f5a 100644 --- a/drivers/tty/serial/8250/8250_dw.c +++ b/drivers/tty/serial/8250/8250_dw.c @@ -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; }