From a6ed0608bd289b45a9e42e3b0f33ff55bdac9b0f Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Wed, 6 Nov 2013 11:07:19 +0100 Subject: ASoC: Replace BUG() with WARN() BUG() used in the driver is just to spit the stack trace on buggy points, not really needed to stop the whole operation. For that purpose, it'd be more convenient to use WARN() instead with more error information. Signed-off-by: Takashi Iwai Signed-off-by: Mark Brown --- sound/soc/soc-cache.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'sound/soc/soc-cache.c') diff --git a/sound/soc/soc-cache.c b/sound/soc/soc-cache.c index e72f55428f0b..223dc0636fe5 100644 --- a/sound/soc/soc-cache.c +++ b/sound/soc/soc-cache.c @@ -39,7 +39,8 @@ static bool snd_soc_set_cache_val(void *base, unsigned int idx, break; } default: - BUG(); + WARN(1, "Invalid word_size %d\n", word_size); + break; } return false; } @@ -60,7 +61,8 @@ static unsigned int snd_soc_get_cache_val(const void *base, unsigned int idx, return cache[idx]; } default: - BUG(); + WARN(1, "Invalid word_size %d\n", word_size); + break; } /* unreachable */ return -1; -- cgit v1.2.3