From patchwork Sat Sep 21 01:03:11 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Emilio_L=C3=B3pez?= X-Patchwork-Id: 2921961 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.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 035B99F1E2 for ; Sat, 21 Sep 2013 01:06:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 369D5204C7 for ; Sat, 21 Sep 2013 01:06:15 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 70D0A203F7 for ; Sat, 21 Sep 2013 01:06:10 +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 1VNBdQ-0000l5-Tp; Sat, 21 Sep 2013 01:05:21 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VNBdE-0000fx-U0; Sat, 21 Sep 2013 01:05:08 +0000 Received: from zetta.elopez.com.ar ([199.30.59.35]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VNBd3-0000dN-5w for linux-arm-kernel@lists.infradead.org; Sat, 21 Sep 2013 01:04:58 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=elopez.com.ar; s=mail; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=fqhNbgHzFKCDyj/Hh0Qa0qOF2hXpn/iA9PkwIORxUN8=; b=N0jsf8RJLNnuRw3wukc9ZNgdXmuj3PM+kZy6G8iVFPb5K7wdMH38Qog6I5pywsPwdIwrHom4pDwKcl3N25ylZO8Y4RC8u5A8dOaTrlPEQCuhv5msbW4IUM2hozj5BNwT9KebVr1IIEhpnzdPQVhLnCqhamU9Ijkg3jyjtpCN26JxkgUru2Fvaqtc0AnF1LEH4hvlpCDFgI6heWOsAmmG36nRR/60UH0iSSIZJ81bXZFIowYmmRpKV4GUeC5dvO7anQi4ssxeoX6AAzzoRdWDrPWbVTDDGU5jLS2kfe8DQWe76kSDSeM1teuibMLLr69FihV9iL6js5AI8+lkloo3mA==; Received: from 201-212-126-35.prima.net.ar ([201.212.126.35] helo=desktop.lan) by zetta.elopez.com.ar with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) id 1VNBck-00072F-3y; Fri, 20 Sep 2013 22:04:38 -0300 From: =?UTF-8?q?Emilio=20L=C3=B3pez?= To: Mike Turquette , Maxime Ripard Subject: [PATCH 2/3] clk: sunxi: factors: clear variables before using them Date: Fri, 20 Sep 2013 22:03:11 -0300 Message-Id: <1379725392-30202-3-git-send-email-emilio@elopez.com.ar> X-Mailer: git-send-email 1.8.4 In-Reply-To: <1379725392-30202-1-git-send-email-emilio@elopez.com.ar> References: <1379725392-30202-1-git-send-email-emilio@elopez.com.ar> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130920_210457_381877_33057B3B X-CRM114-Status: UNSURE ( 7.81 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.7 (--) Cc: =?UTF-8?q?Emilio=20L=C3=B3pez?= , linux-arm-kernel@lists.infradead.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: , 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.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,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 Random bits may get into our factors if we don't clear n, k, m and p. Signed-off-by: Emilio López Acked-by: Maxime Ripard --- drivers/clk/sunxi/clk-factors.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/sunxi/clk-factors.c b/drivers/clk/sunxi/clk-factors.c index 5687ac9..f05207a 100644 --- a/drivers/clk/sunxi/clk-factors.c +++ b/drivers/clk/sunxi/clk-factors.c @@ -88,7 +88,7 @@ static long clk_factors_round_rate(struct clk_hw *hw, unsigned long rate, static int clk_factors_set_rate(struct clk_hw *hw, unsigned long rate, unsigned long parent_rate) { - u8 n, k, m, p; + u8 n = 0, k = 0, m = 0, p = 0; u32 reg; struct clk_factors *factors = to_clk_factors(hw); struct clk_factors_config *config = factors->config;