From patchwork Wed Feb 19 14:18:41 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ivan T. Ivanov" X-Patchwork-Id: 3681331 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 95665BF13A for ; Wed, 19 Feb 2014 14:31:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8205A20115 for ; Wed, 19 Feb 2014 14:31:15 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 275D1200F4 for ; Wed, 19 Feb 2014 14:31:14 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WG824-0001TY-Gm; Wed, 19 Feb 2014 14:21:54 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WG817-0002Ev-VQ; Wed, 19 Feb 2014 14:20:53 +0000 Received: from ns.mm-sol.com ([37.157.136.199] helo=extserv.mm-sol.com) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WG80l-0002Bo-MT for linux-arm-kernel@lists.infradead.org; Wed, 19 Feb 2014 14:20:33 +0000 Received: from iivanov-dev.wifi.mm-sol.com (unknown [37.157.136.206]) by extserv.mm-sol.com (Postfix) with ESMTPSA id E43EE4F881; Wed, 19 Feb 2014 16:20:05 +0200 (EET) From: "Ivan T. Ivanov" To: Mike Turquette Subject: [PATCH] clk: qcom: Add missing clock at index GCC_XO_CLK for MSM8974 Date: Wed, 19 Feb 2014 16:18:41 +0200 Message-Id: <1392819521-25734-1-git-send-email-iivanov@mm-sol.com> X-Mailer: git-send-email 1.7.9.5 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140219_092031_975531_7BE4AF84 X-CRM114-Status: UNSURE ( 8.23 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.5 (--) Cc: linux-arm-msm@vger.kernel.org, Stephen Boyd , linux-arm-kernel@lists.infradead.org, "Ivan T. Ivanov" , linux-kernel@vger.kernel.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: "Ivan T. Ivanov" Accessing GCC on MSM8974 trough <&gcc GCC_XO_CLK> lead to NULL pointer dereference. Fix this. Signed-off-by: Ivan T. Ivanov --- drivers/clk/qcom/gcc-msm8974.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/clk/qcom/gcc-msm8974.c b/drivers/clk/qcom/gcc-msm8974.c index 51d457e..98be7ea 100644 --- a/drivers/clk/qcom/gcc-msm8974.c +++ b/drivers/clk/qcom/gcc-msm8974.c @@ -2625,6 +2625,8 @@ static int gcc_msm8974_probe(struct platform_device *pdev) if (IS_ERR(clk)) return PTR_ERR(clk); + clks[GCC_XO_CLK] = clk; + /* Should move to DT node? */ clk = clk_register_fixed_rate(dev, "sleep_clk_src", NULL, CLK_IS_ROOT, 32768);