mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
ASoC: samsung-i2s: Check secondary DAI exists before referencing
commit 133c2681c4
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>
This commit is contained in:
parent
1f8f277312
commit
87fd5ce262
1 changed files with 1 additions and 1 deletions
|
@ -392,7 +392,7 @@ static int i2s_set_sysclk(struct snd_soc_dai *dai,
|
|||
if (dir == SND_SOC_CLOCK_IN)
|
||||
rfs = 0;
|
||||
|
||||
if ((rfs && other->rfs && (other->rfs != rfs)) ||
|
||||
if ((rfs && other && other->rfs && (other->rfs != rfs)) ||
|
||||
(any_active(i2s) &&
|
||||
(((dir == SND_SOC_CLOCK_IN)
|
||||
&& !(mod & MOD_CDCLKCON)) ||
|
||||
|
|
Loading…
Reference in a new issue