diff options
author | Lee Jones <lee.jones@linaro.org> | 2015-07-10 09:45:35 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-07-10 20:34:06 +0200 |
commit | b343e08f3c5623d12829ad4965dd4c4e50f86fa2 (patch) | |
tree | e686e8cab19733b316eb2dc7f655a4f045103d33 /drivers/regulator | |
parent | regulator: pwm-regulator: Fix 'unused-variable' warning (diff) | |
download | linux-b343e08f3c5623d12829ad4965dd4c4e50f86fa2.tar.xz linux-b343e08f3c5623d12829ad4965dd4c4e50f86fa2.zip |
regulator: pwm-regulator: Fix 'used uninitialized' warning
drivers/regulator/pwm-regulator.c:
In function 'pwm_regulator_init_table':
drivers/regulator/pwm-regulator.c:172:14:
warning: 'length' is used uninitialized in this function [-Wuninitialized]
if ((length < sizeof(*duty_cycle_table)) ||
^
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/regulator')
-rw-r--r-- | drivers/regulator/pwm-regulator.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/regulator/pwm-regulator.c b/drivers/regulator/pwm-regulator.c index a4c2ce92d41f..331b85148680 100644 --- a/drivers/regulator/pwm-regulator.c +++ b/drivers/regulator/pwm-regulator.c @@ -163,7 +163,7 @@ static int pwm_regulator_init_table(struct platform_device *pdev, { struct device_node *np = pdev->dev.of_node; struct pwm_voltages *duty_cycle_table; - int length; + int length = 0; int ret; of_find_property(np, "voltage-table", &length); |