]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ASoC: samsung-i2s: Check secondary DAI exists before referencing
authorCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
Tue, 9 Sep 2014 15:51:49 +0000 (16:51 +0100)
committerZefan Li <lizefan@huawei.com>
Mon, 1 Dec 2014 10:02:32 +0000 (18:02 +0800)
commit87fd5ce262733a437d0135741c6621f5418e6ede
tree61ba1d3b4ed34b882ebd20021113c0272209bc20
parent1f8f277312d81d9412ec94bec8ab1ba0dce0bf05
ASoC: samsung-i2s: Check secondary DAI exists before referencing

commit 133c2681c4a0c1b589d138c2fdd0f131bdce20ed upstream.

In a couple of places the driver is missing a check to ensure there is a
secondary DAI before it de-references the pointer to it, causing a null
pointer de-reference. This patch adds a check to avoid this.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
[lizf: Backported to 3.4: drop the changes to i2s_shutdown()]
Signed-off-by: Zefan Li <lizefan@huawei.com>
sound/soc/samsung/i2s.c