ASoC: samsung: odroid: fix an use-after-free issue for codec
authorWen Yang <wen.yang99@zte.com.cn>
Sat, 13 Jul 2019 03:46:14 +0000 (11:46 +0800)
committerMark Brown <broonie@kernel.org>
Tue, 16 Jul 2019 18:17:14 +0000 (19:17 +0100)
commit9b6d104a6b150bd4d3e5b039340e1f6b20c2e3c1
treee319dde146adcf0f9be003514061178ca7cec2b1
parentec3042ad39d4e2ddbc3a3344f90bb10d8feb53bc
ASoC: samsung: odroid: fix an use-after-free issue for codec

The codec variable is still being used after the of_node_put() call,
which may result in use-after-free.

Fixes: bc3cf17b575a ("ASoC: samsung: odroid: Add support for secondary CPU DAI")
Signed-off-by: Wen Yang <wen.yang99@zte.com.cn>
Cc: Krzysztof Kozlowski <krzk@kernel.org>
Cc: Sangbeom Kim <sbkim73@samsung.com>
Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Jaroslav Kysela <perex@perex.cz>
Cc: Takashi Iwai <tiwai@suse.com>
Cc: alsa-devel@alsa-project.org
Cc: linux-kernel@vger.kernel.org
Link: https://lore.kernel.org/r/1562989575-33785-2-git-send-email-wen.yang99@zte.com.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/samsung/odroid.c