diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2015-07-15 07:10:43 +0000 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-07-16 22:10:33 +0100 |
commit | 72413c107e81386a7da438bcf888ee2af5d3b72f (patch) | |
tree | 3a5982fd861196effb20099736c66328da0e87a5 | |
parent | 1a1bf58aafd09b3cb148eead3d709e2d7974a1f3 (diff) | |
download | blackbird-op-linux-72413c107e81386a7da438bcf888ee2af5d3b72f.tar.gz blackbird-op-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.h | 2 |
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) |