]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: codecs: hdac_hdmi: Fix incorrect use of list_for_each_entry
authorAmadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Wed, 15 Apr 2020 16:28:49 +0000 (12:28 -0400)
committerMark Brown <broonie@kernel.org>
Thu, 16 Apr 2020 12:01:33 +0000 (13:01 +0100)
commitafc5d0acf5d48d44be509ffedacc2ed36ad52fa1
treedc81b4eb669fcf3a6afb954e49f7ffb38cc6ab38
parent28f9b4137288e57b6b731777b7320f8894605242
ASoC: codecs: hdac_hdmi: Fix incorrect use of list_for_each_entry

If we don't find any pcm, pcm will point at address at an offset from
the the list head and not a meaningful structure. Fix this by returning
correct pcm if found and NULL if not. Found with coccinelle.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20200415162849.308-1-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/hdac_hdmi.c