From patchwork Fri Aug 22 00:54:55 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 4760321 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 980C49F344 for ; Fri, 22 Aug 2014 00:57:13 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D02A1201BA for ; Fri, 22 Aug 2014 00:57:12 +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 ED04A2018B for ; Fri, 22 Aug 2014 00:57:11 +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 1XKd8Z-0004hb-2a; Fri, 22 Aug 2014 00:55:27 +0000 Received: from mail-pd0-f201.google.com ([209.85.192.201]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XKd8W-00033b-0o for linux-arm-kernel@lists.infradead.org; Fri, 22 Aug 2014 00:55:24 +0000 Received: by mail-pd0-f201.google.com with SMTP id g10so2663643pdj.4 for ; Thu, 21 Aug 2014 17:55:01 -0700 (PDT) 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=Y76c+GX+mKoIraGkQLrwwLjRwTOVsExDv2vTHvscKsI=; b=TY8b0ok/rEXAl5XkJkbBjFZdPf+UsrQesmbuIWMKDQ+0n/bwSd4Ux3j5BxJW/H2SJN wRBovvE0+QlFhFqW1T3BlXdMG6iQbI85eXu/4y/sN8PU6jfDMWvrDb+RQELzy3l1mJSl 5Y77qQj0i6z1jN/9H075xtLFAXhjBOHPhu7NBLvoP8avINQa+u8hMVOVYpaYUCFYXvqA 7FUKfFVMrBb12suEV50/slunFaf6SSGrethd3p5SBlQhYAYtRngapdfjqXhCIttdt0ze 6KIayvceWAdB8nQOHLIQNPkC57QIOCU7bzCp9h1x+nbDX2OiX3AtYdSkGGuPeEAAZv8i q/IQ== X-Gm-Message-State: ALoCoQlEnmTb8opLcRn8UYlz9BmX5ff01nQ2uzwA3T3slWmMoeP/g2vQ0Qx1ps+2C/95vB3ittJY X-Received: by 10.66.66.46 with SMTP id c14mr1484356pat.21.1408668901372; Thu, 21 Aug 2014 17:55:01 -0700 (PDT) Received: from corp2gmr1-2.hot.corp.google.com (corp2gmr1-2.hot.corp.google.com [172.24.189.93]) by gmr-mx.google.com with ESMTPS id h42si940479yhj.3.2014.08.21.17.55.01 for (version=TLSv1.1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 21 Aug 2014 17:55:01 -0700 (PDT) Received: from tictac.mtv.corp.google.com (tictac.mtv.corp.google.com [172.22.162.15]) by corp2gmr1-2.hot.corp.google.com (Postfix) with ESMTP id 2B2E75A4123; Thu, 21 Aug 2014 17:55:01 -0700 (PDT) Received: by tictac.mtv.corp.google.com (Postfix, from userid 121310) id BA23280783; Thu, 21 Aug 2014 17:55:00 -0700 (PDT) From: Doug Anderson To: Mark Brown Subject: [PATCH] regulator: RK808: Fix uninitialized value Date: Thu, 21 Aug 2014 17:54:55 -0700 Message-Id: <1408668895-1108-1-git-send-email-dianders@chromium.org> X-Mailer: git-send-email 2.1.0.rc2.206.gedb03e5 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140821_175524_077189_CDC39CF1 X-CRM114-Status: UNSURE ( 9.96 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.0 (--) Cc: Addy Ke , Heiko Stuebner , lgirdwood@gmail.com, linux-kernel@vger.kernel.org, Kever Yang , Doug Anderson , Chris Zhong , Sonny Rao , linux-arm-kernel@lists.infradead.org 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=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, 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 RK808 regulator driver was putting its config on the stack but not initting it. That means that you got a semi-random config. Fix this. Signed-off-by: Doug Anderson --- drivers/regulator/rk808-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/rk808-regulator.c b/drivers/regulator/rk808-regulator.c index 94753fd..4d5041c 100644 --- a/drivers/regulator/rk808-regulator.c +++ b/drivers/regulator/rk808-regulator.c @@ -334,7 +334,7 @@ static int rk808_regulator_probe(struct platform_device *pdev) { struct rk808 *rk808 = dev_get_drvdata(pdev->dev.parent); struct rk808_board *pdata; - struct regulator_config config; + struct regulator_config config = {}; struct regulator_dev *rk808_rdev; struct regulator_init_data *reg_data; int i = 0;