Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752916AbaA3Lhb (ORCPT ); Thu, 30 Jan 2014 06:37:31 -0500 Received: from arroyo.ext.ti.com ([192.94.94.40]:54863 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751567AbaA3Lha (ORCPT ); Thu, 30 Jan 2014 06:37:30 -0500 From: Ivan Khoronzhuk To: CC: , , , Ivan Khoronzhuk Subject: [PATCH] clk: keystone: gate: fix clk_init_data initialization Date: Thu, 30 Jan 2014 13:37:01 +0200 Message-ID: <1391081821-13306-1-git-send-email-ivan.khoronzhuk@ti.com> X-Mailer: git-send-email 1.8.3.2 MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In clk_register_psc() function clk_init_data struct is allocated in the stack. All members of this struct should be initialized before using otherwise it will contain garbage. So initialize flags in this structure too. Signed-off-by: Ivan Khoronzhuk --- drivers/clk/keystone/gate.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/clk/keystone/gate.c b/drivers/clk/keystone/gate.c index 17a5983..86f1e36 100644 --- a/drivers/clk/keystone/gate.c +++ b/drivers/clk/keystone/gate.c @@ -179,6 +179,7 @@ static struct clk *clk_register_psc(struct device *dev, init.name = name; init.ops = &clk_psc_ops; + init.flags = 0; init.parent_names = (parent_name ? &parent_name : NULL); init.num_parents = (parent_name ? 1 : 0); -- 1.8.3.2 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/