]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: hdmi-codec: Fix hdmi_of_xlate_dai_name when #sound-dai-cells = <0>
authorJon Medhurst (Tixy) <tixy@linaro.org>
Fri, 28 Oct 2016 08:18:24 +0000 (09:18 +0100)
committerMark Brown <broonie@kernel.org>
Fri, 28 Oct 2016 17:22:17 +0000 (18:22 +0100)
commit6eda6f8f9de2f850f5dec37942441dd485d84e40
treee202f7aa6fdbfbc07187fa6dd2c4d64aeb974371
parenta245803230f587f66ceddc152f3504b2a960aac2
ASoC: hdmi-codec: Fix hdmi_of_xlate_dai_name when #sound-dai-cells = <0>

If a DAI specifies "#sound-dai-cells = <0>" in device-tree then
hdmi_of_xlate_dai_name() will be called with zero args, which it isn't
implemented to cope with. The resulting use of an uninitialised variable
for the id will usually result in an error like:

  asoc-simple-card sound: parse error -11
  asoc-simple-card: probe of sound failed with error -11

Fix this by using and id of zero if no arg is provided.

Fixes: 59d96bd1f99f ("ASoC: hdmi-codec: enable multi probe for same device")
Signed-off-by: Jon Medhurst <tixy@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/hdmi-codec.c