summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2015-04-13 09:00:45 +0300
committerMark Brown <broonie@kernel.org>2015-04-15 19:05:27 +0300
commitd1acba2fdebb449bad01e7cf77a9f9730dfaca6e (patch)
tree8253edf1b2a10815ef566929f4f98ad53c29b538 /sound
parent7667428f80526d908124e0647ac5dbe3dad88900 (diff)
downloadlinux-d1acba2fdebb449bad01e7cf77a9f9730dfaca6e.tar.xz
ASoC: rsnd: set dmaen->chan = NULL when error case
rsnd_dmaen_quit() is assuming dmaen->chan is NULL if it failed to get DMAEngine channel. but, current dmaen->chan might have error value when error case (this driver is checking it by IS_ERR_OR_NULL()) This patch makes sure dmaen->chan is NULL when error case. Otherwise, it will contact to unknown address in rsnd_dmaen_quit() Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/sh/rcar/dma.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/soc/sh/rcar/dma.c b/sound/soc/sh/rcar/dma.c
index ac3756f6af60..144308f15fb3 100644
--- a/sound/soc/sh/rcar/dma.c
+++ b/sound/soc/sh/rcar/dma.c
@@ -156,6 +156,7 @@ static int rsnd_dmaen_init(struct rsnd_priv *priv, struct rsnd_dma *dma, int id,
(void *)id);
}
if (IS_ERR_OR_NULL(dmaen->chan)) {
+ dmaen->chan = NULL;
dev_err(dev, "can't get dma channel\n");
goto rsnd_dma_channel_err;
}