From: Qing Xu <qi...@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 <qi...@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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to