Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ASoC: amd: acp: remove unnecessary NULL check

The list iterator in a list_for_each_entry() loop can never be NULL.
Remove the check and pull the code in a tab.

Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/e376a712-e0c6-446f-9e0b-c444dd795cbb@moroto.mountain
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Dan Carpenter and committed by
Mark Brown
601cc04c dc29d3d2

+10 -12
+10 -12
sound/soc/amd/acp/acp63.c
··· 283 283 284 284 spin_lock(&adata->acp_lock); 285 285 list_for_each_entry(stream, &adata->stream_list, list) { 286 - if (stream) { 287 - substream = stream->substream; 288 - if (substream && substream->runtime) { 289 - buf_in_frames = (substream->runtime->buffer_size); 290 - buf_size = frames_to_bytes(substream->runtime, buf_in_frames); 291 - config_pte_for_stream(adata, stream); 292 - config_acp_dma(adata, stream, buf_size); 293 - if (stream->dai_id) 294 - restore_acp_i2s_params(substream, adata, stream); 295 - else 296 - restore_acp_pdm_params(substream, adata); 297 - } 286 + substream = stream->substream; 287 + if (substream && substream->runtime) { 288 + buf_in_frames = (substream->runtime->buffer_size); 289 + buf_size = frames_to_bytes(substream->runtime, buf_in_frames); 290 + config_pte_for_stream(adata, stream); 291 + config_acp_dma(adata, stream, buf_size); 292 + if (stream->dai_id) 293 + restore_acp_i2s_params(substream, adata, stream); 294 + else 295 + restore_acp_pdm_params(substream, adata); 298 296 } 299 297 } 300 298 spin_unlock(&adata->acp_lock);