diff options
author | Vinod Koul <vinod.koul@intel.com> | 2016-07-08 09:00:17 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2016-07-08 10:36:45 -0400 |
commit | 5d554ea4f287665b839975ecb11bd29d49a5c9b5 (patch) | |
tree | 43507758fefd9603f5f7b059fca1da518feea03a /sound/soc/intel/boards | |
parent | 07d5c17b80f67d1b2cc2c8243590e2abed4bd7ae (diff) |
ASoC: Intel: cht: fix uninit variable warning
Kbuild bot reports that we might use dai_index uninitialized.
sound/soc/intel/boards/cht_bsw_rt5645.c:391:37: warning: 'dai_index' may be used uninitialized in this function [-Wmaybe-uninitialized]
Since it is theoretically possible, set it while initializing.
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/intel/boards')
-rw-r--r-- | sound/soc/intel/boards/cht_bsw_rt5645.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/intel/boards/cht_bsw_rt5645.c b/sound/soc/intel/boards/cht_bsw_rt5645.c index f26c7b8545ae..56056ed7fcfd 100644 --- a/sound/soc/intel/boards/cht_bsw_rt5645.c +++ b/sound/soc/intel/boards/cht_bsw_rt5645.c | |||
@@ -357,7 +357,7 @@ static int snd_cht_mc_probe(struct platform_device *pdev) | |||
357 | char codec_name[16]; | 357 | char codec_name[16]; |
358 | struct sst_acpi_mach *mach; | 358 | struct sst_acpi_mach *mach; |
359 | const char *i2c_name = NULL; | 359 | const char *i2c_name = NULL; |
360 | int dai_index; | 360 | int dai_index = 0; |
361 | 361 | ||
362 | drv = devm_kzalloc(&pdev->dev, sizeof(*drv), GFP_ATOMIC); | 362 | drv = devm_kzalloc(&pdev->dev, sizeof(*drv), GFP_ATOMIC); |
363 | if (!drv) | 363 | if (!drv) |