From: Vinod Koul Date: Fri, 8 Jul 2016 13:00:17 +0000 (+0530) Subject: ASoC: Intel: cht: fix uninit variable warning X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5d554ea4f287665b839975ecb11bd29d49a5c9b5;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Mark Brown --- 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) char codec_name[16]; struct sst_acpi_mach *mach; const char *i2c_name = NULL; - int dai_index; + int dai_index = 0; drv = devm_kzalloc(&pdev->dev, sizeof(*drv), GFP_ATOMIC); if (!drv)