summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2015-07-15 09:10:43 +0200
committerMark Brown <broonie@kernel.org>2015-07-16 23:10:33 +0200
commit72413c107e81386a7da438bcf888ee2af5d3b72f (patch)
tree3a5982fd861196effb20099736c66328da0e87a5
parentASoC: rsnd: add workaround for SRC sync convert + DVC (diff)
downloadlinux-72413c107e81386a7da438bcf888ee2af5d3b72f.tar.xz
linux-72413c107e81386a7da438bcf888ee2af5d3b72f.zip
ASoC: rsnd: rsnd_mod_id() return -1 if mod was NULL
enabling to use same method for exception case is useful. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/sh/rcar/rsnd.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/sh/rcar/rsnd.h b/sound/soc/sh/rcar/rsnd.h
index 9ecd15180184..46eb4daa1461 100644
--- a/sound/soc/sh/rcar/rsnd.h
+++ b/sound/soc/sh/rcar/rsnd.h
@@ -316,7 +316,7 @@ struct rsnd_mod {
#define rsnd_mod_to_priv(mod) ((mod)->priv)
#define rsnd_mod_to_dma(mod) (&(mod)->dma)
-#define rsnd_mod_id(mod) ((mod)->id)
+#define rsnd_mod_id(mod) ((mod) ? (mod)->id : -1)
#define rsnd_mod_hw_start(mod) clk_enable((mod)->clk)
#define rsnd_mod_hw_stop(mod) clk_disable((mod)->clk)