From patchwork Mon May 18 03:41:49 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricky Liang X-Patchwork-Id: 6426011 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 2DCE99F1C1 for ; Mon, 18 May 2015 03:49:35 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5DBDF20451 for ; Mon, 18 May 2015 03:49:34 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (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 9B312205DC for ; Mon, 18 May 2015 03:49:33 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YuBzw-0002Ll-SY; Mon, 18 May 2015 03:45:48 +0000 Received: from mail-pa0-x230.google.com ([2607:f8b0:400e:c03::230]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YuBzs-0001fu-Ro for linux-arm-kernel@lists.infradead.org; Mon, 18 May 2015 03:45:45 +0000 Received: by padbw4 with SMTP id bw4so133019778pad.0 for ; Sun, 17 May 2015 20:45:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id; bh=6o8Dg5TJNgUZomYdrkiN8QIdR7xmZn54yO++RxBir5M=; b=B3nDtOADn7PHDsF/ImQp28ahEl/ikaE9h7e4Pf6jd1FfJrFZ/sBD4dDT6X2CBxReZF hprse/IRzIgEtZ+eVm3LpD8s+jtpeIM+vPTL/W9K8lWLAXIqzOI0so08y/f3D0xoZ6rJ maYKCq0M6jfaybeJNCmtjoZehHKWotVSLtiBw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=6o8Dg5TJNgUZomYdrkiN8QIdR7xmZn54yO++RxBir5M=; b=clMAsUWTB2uo1WeErtYt5izIp1wVoy76wLDSuvMqw9aHFNFzHquNcTXYh4OwgCLJAa g5jy2JoPo9wMYonIHBqGGNgeiTUM3xM/6hOtqVSFQcGEyrMlHoeHiiZCxcZ2/k3Kdtry A6qCQXq1oDqXUROtFEy/6UYEoEr3aTg9FMa3zFbXWEfga+4wqEAAd59LpaUIOmlB73uj H8zmoVwU5tan9tHzIdqQbY2DxjzSRQm5JH0WNUcavDzhrZYzyjib0mOsp1w1LQ4DEZmr hD92iaEw0xcOhH7y3ObD1DlA2JP8Q2hhVWPh2kdTdIhLED59dQds5MQXGa+yrjaam35p BOXw== X-Gm-Message-State: ALoCoQn2e7w61GdFjN2XLz1prftxpgzS8577QTzlUjtAaenJw56+wVAY5e3ZA+F0iCcPsrOv6JW3 X-Received: by 10.68.179.67 with SMTP id de3mr40536194pbc.85.1431920722227; Sun, 17 May 2015 20:45:22 -0700 (PDT) Received: from jcliang-z620.tpe.corp.google.com ([172.30.210.189]) by mx.google.com with ESMTPSA id ht10sm8389460pdb.41.2015.05.17.20.45.19 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 17 May 2015 20:45:21 -0700 (PDT) From: Ricky Liang To: Mike Turquette , Stephen Boyd Subject: [PATCH v2] clk: mediatek: Initialize clk_init_data Date: Mon, 18 May 2015 11:41:49 +0800 Message-Id: <1431920513-1491-1-git-send-email-jcliang@chromium.org> X-Mailer: git-send-email 2.1.2 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150517_204544_922975_F016D169 X-CRM114-Status: UNSURE ( 9.46 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.8 (/) Cc: James Liao , Sascha Hauer , open list , Henry Chen , Ricky Liang , "moderated list:ARM/Mediatek SoC..." , Matthias Brugger , "open list:COMMON CLK FRAMEWORK" , "moderated list:ARM/Mediatek SoC..." X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 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.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_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 The variable init (struct clk_init_data) is allocated on the stack. We weren't initializing the .flags field, so it contains random junk, which can cause all kinds of interesting issues when the flags are parsed by clk_register. Signed-off-by: Ricky Liang --- drivers/clk/mediatek/clk-pll.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/mediatek/clk-pll.c b/drivers/clk/mediatek/clk-pll.c index 66154ca..44409e9 100644 --- a/drivers/clk/mediatek/clk-pll.c +++ b/drivers/clk/mediatek/clk-pll.c @@ -268,7 +268,7 @@ static struct clk *mtk_clk_register_pll(const struct mtk_pll_data *data, void __iomem *base) { struct mtk_clk_pll *pll; - struct clk_init_data init; + struct clk_init_data init = {}; struct clk *clk; const char *parent_name = "clk26m";