lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <73729ce5.abaa.13ae480da6d.Coremail.helight@126.com>
Date:	Fri, 9 Nov 2012 17:29:40 +0800 (CST)
From:	helight <helight@....com>
To:	linux-kernel@...r.kernel.org
Cc:	lrg@...com, broonie@...nsource.wolfsonmicro.com
Subject: [PATCH] fix build waring: drivers/regulator/core.c: warning: ‘val’ may be used uninitialized in this function [-Wuninitialized]

fix build waring on drivers/regulator/core.c
drivers/regulator/core.c: In function ‘regulator_get_bypass_regmap’:
drivers/regulator/core.c:2748:16: warning: ‘val’ may be used uninitialized in this function [-Wuninitialized]
drivers/regulator/core.c: In function ‘regulator_get_voltage_sel_regmap’:
drivers/regulator/core.c:2016:6: warning: ‘val’ may be used uninitialized in this function [-Wuninitialized]
drivers/regulator/core.c: In function ‘regulator_is_enabled_regmap’:
drivers/regulator/core.c:1786:14: warning: ‘val’ may be used uninitialized in this function [-Wuninitialized]


>From c5b564ba10101961ffca9a67c6ddcc6216b99dce Mon Sep 17 00:00:00 2001
From: helight xu <helight.xu@...il.com>
Date: Sat, 10 Nov 2012 01:11:14 +0800
Subject: [PATCH] fix build waring: drivers/regulator/core.c: warning: ‘val’ may be used uninitialized in this function [-Wuninitialized]


Signed-off-by: helight xu <helight.xu@...il.com>
---
 drivers/regulator/core.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 5c4829c..7ad7174 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -1776,8 +1776,8 @@ EXPORT_SYMBOL_GPL(regulator_disable_deferred);
  */
 int regulator_is_enabled_regmap(struct regulator_dev *rdev)
 {
-   unsigned int val;
    int ret;
+   unsigned int val = 0;

    ret = regmap_read(rdev->regmap, rdev->desc->enable_reg, &val);
    if (ret != 0)
@@ -2006,8 +2006,8 @@ EXPORT_SYMBOL_GPL(regulator_is_supported_voltage);
  */
 int regulator_get_voltage_sel_regmap(struct regulator_dev *rdev)
 {
-   unsigned int val;
    int ret;
+   unsigned int val = 0;

    ret = regmap_read(rdev->regmap, rdev->desc->vsel_reg, &val);
    if (ret != 0)
@@ -2738,8 +2738,8 @@ EXPORT_SYMBOL_GPL(regulator_set_bypass_regmap);
  */
 int regulator_get_bypass_regmap(struct regulator_dev *rdev, bool *enable)
 {
-   unsigned int val;
    int ret;
+   unsigned int val = 0;

    ret = regmap_read(rdev->regmap, rdev->desc->bypass_reg, &val);
    if (ret != 0)
-- 
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ