From: Qing Xu <qingx@marvell.com>
To: qingx@marvell.com, broonie@opensource.wolfsonmicro.com,
lrg@ti.com, haojian.zhuang@gmail.com, cxie4@marvell.com,
linux-kernel@vger.kernel.org
Subject: [PATCH] regulator: max8925: fix compiler warnings
Date: Thu, 22 Nov 2012 10:11:06 +0800 [thread overview]
Message-ID: <1353550266-21330-1-git-send-email-qingx@marvell.com> (raw)
From: Qing Xu <qingx@marvell.com>
Fixed following compiler warning:
- drivers/regulator/max8925-regulator.c:269:51: warning:
'regulator_idx' may be used uninitialized in this function
[-Wmaybe-uninitialized]
Signed-off-by: Qing Xu <qingx@marvell.com>
---
drivers/regulator/max8925-regulator.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/regulator/max8925-regulator.c b/drivers/regulator/max8925-regulator.c
index 2b54979..187b29b 100644
--- a/drivers/regulator/max8925-regulator.c
+++ b/drivers/regulator/max8925-regulator.c
@@ -282,7 +282,8 @@ static int __devinit max8925_regulator_probe(struct platform_device *pdev)
struct max8925_regulator_info *ri;
struct resource *res;
struct regulator_dev *rdev;
- int i, regulator_idx;
+ int i;
+ int regulator_idx = 0;
res = platform_get_resource(pdev, IORESOURCE_REG, 0);
if (!res) {
--
1.7.0.4
next reply other threads:[~2012-11-22 18:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-22 2:11 Qing Xu [this message]
2012-11-23 1:41 ` Mark Brown
2012-11-23 2:27 ` Qing Xu
2012-11-24 17:55 ` Mark Brown
2012-11-26 3:07 ` Qing Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1353550266-21330-1-git-send-email-qingx@marvell.com \
--to=qingx@marvell.com \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=cxie4@marvell.com \
--cc=haojian.zhuang@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lrg@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®