diff options
-rw-r--r-- | sound/soc/soc-cache.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sound/soc/soc-cache.c b/sound/soc/soc-cache.c index 8785a0c918d2..e7479988deca 100644 --- a/sound/soc/soc-cache.c +++ b/sound/soc/soc-cache.c | |||
@@ -25,6 +25,7 @@ static unsigned int snd_soc_4_12_read(struct snd_soc_codec *codec, | |||
25 | if (codec->cache_only) | 25 | if (codec->cache_only) |
26 | return -1; | 26 | return -1; |
27 | 27 | ||
28 | BUG_ON(!codec->hw_read); | ||
28 | return codec->hw_read(codec, reg); | 29 | return codec->hw_read(codec, reg); |
29 | } | 30 | } |
30 | 31 | ||
@@ -99,6 +100,7 @@ static unsigned int snd_soc_7_9_read(struct snd_soc_codec *codec, | |||
99 | if (codec->cache_only) | 100 | if (codec->cache_only) |
100 | return -1; | 101 | return -1; |
101 | 102 | ||
103 | BUG_ON(!codec->hw_read); | ||
102 | return codec->hw_read(codec, reg); | 104 | return codec->hw_read(codec, reg); |
103 | } | 105 | } |
104 | 106 | ||
@@ -199,6 +201,7 @@ static unsigned int snd_soc_8_8_read(struct snd_soc_codec *codec, | |||
199 | if (codec->cache_only) | 201 | if (codec->cache_only) |
200 | return -1; | 202 | return -1; |
201 | 203 | ||
204 | BUG_ON(!codec->hw_read); | ||
202 | return codec->hw_read(codec, reg); | 205 | return codec->hw_read(codec, reg); |
203 | } | 206 | } |
204 | 207 | ||
@@ -270,6 +273,7 @@ static unsigned int snd_soc_8_16_read(struct snd_soc_codec *codec, | |||
270 | if (codec->cache_only) | 273 | if (codec->cache_only) |
271 | return -1; | 274 | return -1; |
272 | 275 | ||
276 | BUG_ON(!codec->hw_read); | ||
273 | return codec->hw_read(codec, reg); | 277 | return codec->hw_read(codec, reg); |
274 | } else { | 278 | } else { |
275 | return cache[reg]; | 279 | return cache[reg]; |
@@ -420,6 +424,7 @@ static unsigned int snd_soc_16_8_read(struct snd_soc_codec *codec, | |||
420 | if (codec->cache_only) | 424 | if (codec->cache_only) |
421 | return -1; | 425 | return -1; |
422 | 426 | ||
427 | BUG_ON(!codec->hw_read); | ||
423 | return codec->hw_read(codec, reg); | 428 | return codec->hw_read(codec, reg); |
424 | } | 429 | } |
425 | 430 | ||
@@ -531,6 +536,7 @@ static unsigned int snd_soc_16_16_read(struct snd_soc_codec *codec, | |||
531 | if (codec->cache_only) | 536 | if (codec->cache_only) |
532 | return -1; | 537 | return -1; |
533 | 538 | ||
539 | BUG_ON(!codec->hw_read); | ||
534 | return codec->hw_read(codec, reg); | 540 | return codec->hw_read(codec, reg); |
535 | } | 541 | } |
536 | 542 | ||