Skip to content

Commit

Permalink
ASoC: soc-pcm: tidyup soc_pcm_hw_clean() - step1
Browse files Browse the repository at this point in the history
soc_pcm_hw_clean() is using "continue" during for_each_rtd_dais(),
but it is very verbose. This patch cleanup it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87k0ibt7ej.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Kuninori Morimoto authored and Mark Brown committed Oct 18, 2021
1 parent b8f3b56 commit 121966d
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions sound/soc/soc-pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -898,12 +898,9 @@ static int soc_pcm_hw_clean(struct snd_pcm_substream *substream, int rollback)
snd_soc_pcm_component_hw_free(substream, rollback);

/* now free hw params for the DAIs */
for_each_rtd_dais(rtd, i, dai) {
if (!snd_soc_dai_stream_valid(dai, substream->stream))
continue;

snd_soc_dai_hw_free(dai, substream, rollback);
}
for_each_rtd_dais(rtd, i, dai)
if (snd_soc_dai_stream_valid(dai, substream->stream))
snd_soc_dai_hw_free(dai, substream, rollback);

mutex_unlock(&rtd->card->pcm_mutex);
return 0;
Expand Down

0 comments on commit 121966d

Please sign in to comment.