]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 10 May 2020 08:30:07 +0000 (10:30 +0200)
commit14dfe0e4e3a308583fc422a7c48e72b30ada9ce7
treed4e2aa3ffb908f5ef28a414c7fc1ac10b1f72e60
parent278a15769bd85a2dbea303af00d660248cc2fcef
ASoC: codecs: hdac_hdmi: Fix incorrect use of list_for_each_entry

[ Upstream commit 326b509238171d37402dbe308e154cc234ed1960 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/soc/codecs/hdac_hdmi.c