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>
This commit is contained in:
Lee Jones 2015-07-10 08:45:35 +01:00 committed by Mark Brown
parent f293634b5a
commit b343e08f3c
1 changed files with 1 additions and 1 deletions

View File

@ -163,7 +163,7 @@ static int pwm_regulator_init_table(struct platform_device *pdev,
{ {
struct device_node *np = pdev->dev.of_node; struct device_node *np = pdev->dev.of_node;
struct pwm_voltages *duty_cycle_table; struct pwm_voltages *duty_cycle_table;
int length; int length = 0;
int ret; int ret;
of_find_property(np, "voltage-table", &length); of_find_property(np, "voltage-table", &length);