diff options
author | Takashi Iwai <tiwai@suse.de> | 2013-11-05 18:40:05 +0100 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-11-07 19:55:16 +0000 |
commit | 8b14719bebfe022f3637c323e76c88b2bc061a61 (patch) | |
tree | a4284d9ca43a0c4b7572547d6812528b75d1a9ac /sound/soc/sh/rcar/ssi.c | |
parent | 4a318f1e6c4331633a91ad67b782860c76d8894b (diff) |
ASoC: rcar: Use WARN_ON() instead of BUG_ON()
Use WARN_ON() and handle the error cases accordingly.
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/sh/rcar/ssi.c')
-rw-r--r-- | sound/soc/sh/rcar/ssi.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c index fae26d3f79d..fc010d65206 100644 --- a/sound/soc/sh/rcar/ssi.c +++ b/sound/soc/sh/rcar/ssi.c @@ -619,7 +619,8 @@ struct rsnd_mod *rsnd_ssi_mod_get_frm_dai(struct rsnd_priv *priv, struct rsnd_mod *rsnd_ssi_mod_get(struct rsnd_priv *priv, int id) { - BUG_ON(id < 0 || id >= rsnd_ssi_nr(priv)); + if (WARN_ON(id < 0 || id >= rsnd_ssi_nr(priv))) + id = 0; return &(((struct rsnd_ssiu *)(priv->ssiu))->ssi + id)->mod; } |