summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolin Chen <b42378@freescale.com>2013-09-10 17:25:52 +0800
committerNicolin Chen <b42378@freescale.com>2013-09-10 18:08:51 +0800
commite4407a8e837c66839c1f8264cb856e10807af6e7 (patch)
treeb5809a3a03a329969f5de1e62aae139900f43d97
parentd5d8461430d37eebbfc45ebea27e7b3ab64934b3 (diff)
ENGR00278967 ASoC: fsl: Fix null pointer when rmmod snd-soc-imx-hdmi
When rmmod snd-soc-imx-hdmi if loadable module feature of HDMI audio is being used, there would be a kernel dump promt: Unable to handle kernel NULL pointer dereference at virtual address This was caused by inappropriate priv pointer fetching, thus fix it. Acked-by: Wang Shengjiu <b02247@freescale.com> Signed-off-by: Nicolin Chen <b42378@freescale.com>
-rw-r--r--sound/soc/fsl/imx-hdmi-dma.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/fsl/imx-hdmi-dma.c b/sound/soc/fsl/imx-hdmi-dma.c
index 372f48c2951c..b76bd79c8cfa 100644
--- a/sound/soc/fsl/imx-hdmi-dma.c
+++ b/sound/soc/fsl/imx-hdmi-dma.c
@@ -1002,8 +1002,8 @@ static void imx_hdmi_dma_pcm_free(struct snd_pcm *pcm)
{
int stream = SNDRV_PCM_STREAM_PLAYBACK;
struct snd_pcm_substream *substream = pcm->streams[stream].substream;
- struct snd_pcm_runtime *runtime = substream->runtime;
- struct hdmi_dma_priv *priv = runtime->private_data;
+ struct snd_soc_pcm_runtime *rtd = pcm->private_data;
+ struct hdmi_dma_priv *priv = dev_get_drvdata(rtd->platform->dev);
if (substream) {
snd_dma_free_pages(&substream->dma_buffer);