Applied "ASoC: Intel: Skylake: Uninitialized variable in probe_codec()" to the asoc tree

Message ID E1d1cMG-0001xn-QD@debutante
State New
Headers show

Commit Message

Mark Brown April 21, 2017, 5:28 p.m.
The patch

   ASoC: Intel: Skylake: Uninitialized variable in probe_codec()

has been applied to the asoc tree at


All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.


From e6a33532affd14c12688c0e9b2e773e8b2550f3b Mon Sep 17 00:00:00 2001
From: Dan Carpenter <>

Date: Thu, 20 Apr 2017 13:17:02 +0300
Subject: [PATCH] ASoC: Intel: Skylake: Uninitialized variable in probe_codec()

My static checker complains that if snd_hdac_bus_get_response() returns
-EIO then "res" is uninitialized.  Fix this by initializing it to -1 so
that the error is handled correctly.

Fixes: d8c2dab8381d ("ASoC: Intel: Add Skylake HDA audio driver")
Signed-off-by: Dan Carpenter <>

Signed-off-by: Mark Brown <>

 sound/soc/intel/skylake/skl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


Alsa-devel mailing list


diff --git a/sound/soc/intel/skylake/skl.c b/sound/soc/intel/skylake/skl.c
index 0c57d4eaae3a..6df3b317a476 100644
--- a/sound/soc/intel/skylake/skl.c
+++ b/sound/soc/intel/skylake/skl.c
@@ -512,7 +512,7 @@  static int probe_codec(struct hdac_ext_bus *ebus, int addr)
 	struct hdac_bus *bus = ebus_to_hbus(ebus);
 	unsigned int cmd = (addr << 28) | (AC_NODE_ROOT << 20) |
-	unsigned int res;
+	unsigned int res = -1;
 	snd_hdac_bus_send_cmd(bus, cmd);