All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/5] ASoC: dapm: Drop always true checks
@ 2015-07-26 17:04 Lars-Peter Clausen
  2015-07-26 17:04 ` [PATCH 2/5] ASoC: dapm: Simplify list creation in dapm_dai_get_connected_widgets() Lars-Peter Clausen
                   ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: Lars-Peter Clausen @ 2015-07-26 17:04 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood; +Cc: alsa-devel, patches, Lars-Peter Clausen

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>
---
 sound/soc/soc-dapm.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 7f834a0..10f7c7c 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -3485,11 +3485,6 @@ static int snd_soc_dai_link_event(struct snd_soc_dapm_widget *w,
 	sink_p = list_first_entry(&w->sinks, struct snd_soc_dapm_path,
 				  list_source);
 
-	if (WARN_ON(!source_p || !sink_p) ||
-	    WARN_ON(!sink_p->source || !source_p->sink) ||
-	    WARN_ON(!source_p->source || !sink_p->sink))
-		return -EINVAL;
-
 	source = source_p->source->priv;
 	sink = sink_p->sink->priv;
 
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2015-08-14  0:00 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-26 17:04 [PATCH 1/5] ASoC: dapm: Drop always true checks Lars-Peter Clausen
2015-07-26 17:04 ` [PATCH 2/5] ASoC: dapm: Simplify list creation in dapm_dai_get_connected_widgets() Lars-Peter Clausen
2015-07-29 14:13   ` Applied "ASoC: dapm: Simplify list creation in dapm_dai_get_connected_widgets()" to the asoc tree Mark Brown
2015-07-26 17:05 ` [PATCH 3/5] ASoC: dapm: Add widget path iterators Lars-Peter Clausen
2015-07-29 14:13   ` Applied "ASoC: dapm: Add widget path iterators" to the asoc tree Mark Brown
2015-07-26 17:05 ` [PATCH 4/5] ASoC: dapm: Consolidate input and output path handling Lars-Peter Clausen
2015-07-29 13:14   ` Mark Brown
2015-08-02 10:18     ` Lars-Peter Clausen
2015-08-04 16:00       ` Mark Brown
2015-07-26 17:05 ` [PATCH 5/5] ASoC: dapm: Consolidate path trace events Lars-Peter Clausen
2015-08-14  0:00   ` Applied "ASoC: dapm: Consolidate path trace events" to the asoc tree Mark Brown
2015-07-29 14:13 ` Applied "ASoC: dapm: Drop always true checks" " Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.