aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-dapm.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2013-11-08 10:45:38 -0500
committerTakashi Iwai <tiwai@suse.de>2013-11-08 10:45:38 -0500
commita6bc732b5a96b5403c2637e85c350b95ec6591f3 (patch)
tree4b1c3967cd1de42a5e36e567cbdd18e1f4e8446f /sound/soc/soc-dapm.c
parent9a22a8f558d09a83965d2bbe168294eb8ffb70e9 (diff)
parentdd212bd5bb8b15889821ef79213cdb5bd47c6f85 (diff)
Merge tag 'asoc-v3.13-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Updates for v3.13 Some additional fixes for v3.13, the majority of which are removals and downgrades of BUG()s from Takashi.
Diffstat (limited to 'sound/soc/soc-dapm.c')
-rw-r--r--sound/soc/soc-dapm.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index cc36caaf6443..dcade130157f 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -1427,7 +1427,7 @@ static void dapm_seq_check_event(struct snd_soc_card *card,
1427 power = 0; 1427 power = 0;
1428 break; 1428 break;
1429 default: 1429 default:
1430 BUG(); 1430 WARN(1, "Unknown event %d\n", event);
1431 return; 1431 return;
1432 } 1432 }
1433 1433
@@ -1460,7 +1460,7 @@ static void dapm_seq_run_coalesced(struct snd_soc_card *card,
1460 power_list)->reg; 1460 power_list)->reg;
1461 1461
1462 list_for_each_entry(w, pending, power_list) { 1462 list_for_each_entry(w, pending, power_list) {
1463 BUG_ON(reg != w->reg); 1463 WARN_ON(reg != w->reg);
1464 w->power = w->new_power; 1464 w->power = w->new_power;
1465 1465
1466 mask |= w->mask << w->shift; 1466 mask |= w->mask << w->shift;
@@ -2026,7 +2026,7 @@ static ssize_t dapm_bias_read_file(struct file *file, char __user *user_buf,
2026 level = "Off\n"; 2026 level = "Off\n";
2027 break; 2027 break;
2028 default: 2028 default:
2029 BUG(); 2029 WARN(1, "Unknown bias_level %d\n", dapm->bias_level);
2030 level = "Unknown\n"; 2030 level = "Unknown\n";
2031 break; 2031 break;
2032 } 2032 }
@@ -3359,8 +3359,9 @@ static int snd_soc_dai_link_event(struct snd_soc_dapm_widget *w,
3359 u64 fmt; 3359 u64 fmt;
3360 int ret; 3360 int ret;
3361 3361
3362 BUG_ON(!config); 3362 if (WARN_ON(!config) ||
3363 BUG_ON(list_empty(&w->sources) || list_empty(&w->sinks)); 3363 WARN_ON(list_empty(&w->sources) || list_empty(&w->sinks)))
3364 return -EINVAL;
3364 3365
3365 /* We only support a single source and sink, pick the first */ 3366 /* We only support a single source and sink, pick the first */
3366 source_p = list_first_entry(&w->sources, struct snd_soc_dapm_path, 3367 source_p = list_first_entry(&w->sources, struct snd_soc_dapm_path,
@@ -3368,9 +3369,10 @@ static int snd_soc_dai_link_event(struct snd_soc_dapm_widget *w,
3368 sink_p = list_first_entry(&w->sinks, struct snd_soc_dapm_path, 3369 sink_p = list_first_entry(&w->sinks, struct snd_soc_dapm_path,
3369 list_source); 3370 list_source);
3370 3371
3371 BUG_ON(!source_p || !sink_p); 3372 if (WARN_ON(!source_p || !sink_p) ||
3372 BUG_ON(!sink_p->source || !source_p->sink); 3373 WARN_ON(!sink_p->source || !source_p->sink) ||
3373 BUG_ON(!source_p->source || !sink_p->sink); 3374 WARN_ON(!source_p->source || !sink_p->sink))
3375 return -EINVAL;
3374 3376
3375 source = source_p->source->priv; 3377 source = source_p->source->priv;
3376 sink = sink_p->sink->priv; 3378 sink = sink_p->sink->priv;
@@ -3446,7 +3448,7 @@ static int snd_soc_dai_link_event(struct snd_soc_dapm_widget *w,
3446 break; 3448 break;
3447 3449
3448 default: 3450 default:
3449 BUG(); 3451 WARN(1, "Unknown event %d\n", event);
3450 return -EINVAL; 3452 return -EINVAL;
3451 } 3453 }
3452 3454