diff options
author | Dan Carpenter <dan.carpenter@linaro.org> | 2023-07-18 10:04:18 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2023-07-18 15:14:35 +0100 |
commit | c1325a2d5182f263f2edbc6e0c1e581e4c5d5a95 (patch) | |
tree | 4decbeaa46287deadcb2390d71987a85b6e99baa /sound/soc/amd/acp | |
parent | 72ab68580cd04ab8745b854a9ee2e5ea7c70d473 (diff) | |
download | linux-stable-c1325a2d5182f263f2edbc6e0c1e581e4c5d5a95.tar.gz linux-stable-c1325a2d5182f263f2edbc6e0c1e581e4c5d5a95.tar.bz2 linux-stable-c1325a2d5182f263f2edbc6e0c1e581e4c5d5a95.zip |
ASoC: amd: acp: delete unnecessary NULL check
The list iterator can't be NULL. Delete the check and pull the code
in one tab.
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/b0c5b0ca-68da-47e6-a8b0-e0714f0de119@moroto.mountain
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/amd/acp')
-rw-r--r-- | sound/soc/amd/acp/acp-rembrandt.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/sound/soc/amd/acp/acp-rembrandt.c b/sound/soc/amd/acp/acp-rembrandt.c index 21e67ed956d1..cc8284f417c0 100644 --- a/sound/soc/amd/acp/acp-rembrandt.c +++ b/sound/soc/amd/acp/acp-rembrandt.c @@ -266,18 +266,16 @@ static int __maybe_unused rmb_pcm_resume(struct device *dev) acp6x_master_clock_generate(dev); spin_lock(&adata->acp_lock); list_for_each_entry(stream, &adata->stream_list, list) { - if (stream) { - substream = stream->substream; - if (substream && substream->runtime) { - buf_in_frames = (substream->runtime->buffer_size); - buf_size = frames_to_bytes(substream->runtime, buf_in_frames); - config_pte_for_stream(adata, stream); - config_acp_dma(adata, stream, buf_size); - if (stream->dai_id) - restore_acp_i2s_params(substream, adata, stream); - else - restore_acp_pdm_params(substream, adata); - } + substream = stream->substream; + if (substream && substream->runtime) { + buf_in_frames = (substream->runtime->buffer_size); + buf_size = frames_to_bytes(substream->runtime, buf_in_frames); + config_pte_for_stream(adata, stream); + config_acp_dma(adata, stream, buf_size); + if (stream->dai_id) + restore_acp_i2s_params(substream, adata, stream); + else + restore_acp_pdm_params(substream, adata); } } spin_unlock(&adata->acp_lock); |