ASoC: Intel: Skylake: Fix compiler warning -Wmaybe-uninitialized
Subsystems (3)
PATCH 1/1 ASoC: Intel: Skylake: Fix compiler warning -Wmaybe-uninitialized
Configuration:
SND_SOC_INTEL_SKYLAKE=y
PM_SLEEP=y
Warning message:
sound/soc/intel/skylake/skl.c: In function 'skl_resume':sound/soc/intel/skylake/skl.c:326:6: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized]
int ret;
^~~--- sound/soc/intel/skylake/skl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/intel/skylake/skl.c +1 -1
@@ -323,7 +323,7 @@ static int skl_resume(struct device *dev)struct skl *skl =ebus_to_skl (ebus);struct hdac_bus *bus =ebus_to_hbus (ebus);struct hdac_ext_link *hlink =NULL ; -int ret; +int ret =0 ;/* Turned OFF in HDMI codec driver after codec reconfiguration */ if (IS_ENABLED (CONFIG_SND_SOC_HDAC_HDMI )) {
Signature · 1 line
2.13.6
Hi,
Quoted 35 lines · Kirill Marinushkin
Configuration:
SND_SOC_INTEL_SKYLAKE=y
PM_SLEEP=yWarning message:
sound/soc/intel/skylake/skl.c: In function 'skl_resume':sound/soc/intel/skylake/skl.c:326:6: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized]int ret; ^~~Fixes 4557c305d4fc ("ASoC: Intel: Skylake: Add support for active suspend")Signed-off-by Kirill Marinushkin <[email protected]>Cc Liam Girdwood <[email protected]>Cc Mark Brown <[email protected]>Cc Jaroslav Kysela <[email protected]>Cc Takashi Iwai <[email protected]>Cc Vinod Koul <[email protected]>Cc Guneshwor Singh <[email protected]>Cc Naveen Manohar <[email protected]>Cc Harsha Priya N <[email protected]>Cc Pierre-Louis Bossart <[email protected]>--- sound/soc/intel/skylake/skl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)sound/soc/intel/skylake/skl.c +0
-0
sound/soc/intel/skylake/skl.c static int skl_resume(struct device *dev) · line 329
Quoted 8 lines
sound/soc/intel/skylake/skl.c +1
-1@@ -323,7 +323,7 @@ static int skl_resume(struct device *dev)struct skl *skl =ebus_to_skl (ebus);struct hdac_bus *bus =ebus_to_hbus (ebus);struct hdac_ext_link *hlink =NULL ; -int ret; +int ret =0 ;/* Turned OFF in HDMI codec driver after codec reconfiguration */ if (IS_ENABLED (CONFIG_SND_SOC_HDAC_HDMI )) {
At current HEAD (ea954fbc35e6) in 'topic/intel' branch[1] of Mark's tree, this issue was already fixed by Arnd Bergmann Nov 2017 by his commit cc20c4df1627 ('ASoC: intel: initialize return value properly')[2].
[1] https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git/log/?h=topic/intel
[2] https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git/commit/?h=topic/intel&id=cc20c4df1627
Regards
Takashi Sakamoto