Unverified Commit 8fd0e127 authored by Thorsten Blum's avatar Thorsten Blum Committed by Mark Brown
Browse files

ASoC: amd: acp: acp70: Remove unnecessary if-check



Since list_for_each_entry() expects the list to not be empty, the
iterator variable cannot be NULL and the unnecessary if-check can be
removed. Remove it and indent the code accordingly.

Compile-tested only.

Signed-off-by: default avatarThorsten Blum <thorsten.blum@linux.dev>
Link: https://patch.msgid.link/20250224221214.199849-2-thorsten.blum@linux.dev


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 63d93f4d
Loading
Loading
Loading
Loading
+10 −12
Original line number Diff line number Diff line
@@ -230,7 +230,6 @@ static int __maybe_unused acp70_pcm_resume(struct device *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);
@@ -243,7 +242,6 @@ static int __maybe_unused acp70_pcm_resume(struct device *dev)
				restore_acp_pdm_params(substream, adata);
		}
	}
	}
	spin_unlock(&adata->acp_lock);
	return 0;
}