aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2015-07-26 13:04:58 -0400
committerMark Brown <broonie@kernel.org>2015-07-29 09:01:37 -0400
commit787126ebdb9821f1a19b1dfd1ab1bbb74b8c80b8 (patch)
tree52452f745fd199aeb4efc3fb983c1caed92324d1
parent480689617510381391b3d906549477b948d9c4bc (diff)
ASoC: dapm: Drop always true checks
list_first_entry() always returns non NULL and since the code previously checked that list is not empty it will also be a valid pointer. Furthermore a path has always a sink or a source widget. So both checks are redundant and can be removed. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/soc-dapm.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index cb4bc1cd5049..f80b7ded0721 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -3482,11 +3482,6 @@ static int snd_soc_dai_link_event(struct snd_soc_dapm_widget *w,
3482 sink_p = list_first_entry(&w->sinks, struct snd_soc_dapm_path, 3482 sink_p = list_first_entry(&w->sinks, struct snd_soc_dapm_path,
3483 list_source); 3483 list_source);
3484 3484
3485 if (WARN_ON(!source_p || !sink_p) ||
3486 WARN_ON(!sink_p->source || !source_p->sink) ||
3487 WARN_ON(!source_p->source || !sink_p->sink))
3488 return -EINVAL;
3489
3490 source = source_p->source->priv; 3485 source = source_p->source->priv;
3491 sink = sink_p->sink->priv; 3486 sink = sink_p->sink->priv;
3492 3487