提交 b343e08f 编写于 作者: L Lee Jones 提交者: Mark Brown

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: Nkbuild test robot <fengguang.wu@intel.com>
Signed-off-by: NLee Jones <lee.jones@linaro.org>
Signed-off-by: NMark Brown <broonie@kernel.org>
上级 f293634b
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册