summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorInha Song <ideal.song@samsung.com>2014-07-28 15:27:01 +0900
committerChanho Park <chanho61.park@samsung.com>2014-11-18 12:00:20 +0900
commit5724a044465848022e3235d3e7d664a0ee552070 (patch)
tree3d77c3eb8dea69ee6ae3bbd0cd8d98cd950d4229 /sound
parent0199e571edc727e3af37c009bb541e0c436b8436 (diff)
downloadlinux-3.10-5724a044465848022e3235d3e7d664a0ee552070.tar.gz
linux-3.10-5724a044465848022e3235d3e7d664a0ee552070.tar.bz2
linux-3.10-5724a044465848022e3235d3e7d664a0ee552070.zip
ASoC: Samsung: i2s: Check whether other i2s_dai is NULL
If i2s don't have a secondary i2s dai, other i2s_dai is NULL. So we need to check whether other i2s_dai is NULL before set other->cdclk_out to i2s->cdclk_out in i2s_shutdown function. Signed-off-by: Inha Song <ideal.song@samsung.com>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/samsung/i2s.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c
index fa2872742e8..84e6d5ca54f 100644
--- a/sound/soc/samsung/i2s.c
+++ b/sound/soc/samsung/i2s.c
@@ -725,7 +725,9 @@ static void i2s_shutdown(struct snd_pcm_substream *substream,
} else {
u32 mod = readl(i2s->addr + I2SMOD);
i2s->cdclk_out = !(mod & MOD_CDCLKCON);
- other->cdclk_out = i2s->cdclk_out;
+
+ if (other)
+ other->cdclk_out = i2s->cdclk_out;
}
/* Reset any constraint on RFS and BFS */
i2s->rfs = 0;