diff mbox series

ASoC: amd: acp: Return in-case of error

Message ID 20240906103727.222749-1-usama.anjum@collabora.com (mailing list archive)
State Accepted
Commit 3c5a18a10a8c6fab27739e6e7bd0e4c0aa854d92
Headers show
Series ASoC: amd: acp: Return in-case of error | expand

Commit Message

Muhammad Usama Anjum Sept. 6, 2024, 10:37 a.m. UTC
Return when error occurs instead of proceeding to for loop which will
use val uninitialized.

Fixes: f6f7d25b1103 ("ASoC: amd: acp: Add pte configuration for ACP7.0 platform")
Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
---
The fix may be wrong. Please consider this patch as report and fix it.
---
 sound/soc/amd/acp/acp-platform.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Mark Brown Sept. 6, 2024, 1:05 p.m. UTC | #1
On Fri, 06 Sep 2024 15:37:24 +0500, Muhammad Usama Anjum wrote:
> Return when error occurs instead of proceeding to for loop which will
> use val uninitialized.
> 
> 

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: amd: acp: Return in-case of error
      commit: 3c5a18a10a8c6fab27739e6e7bd0e4c0aa854d92

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark
diff mbox series

Patch

diff --git a/sound/soc/amd/acp/acp-platform.c b/sound/soc/amd/acp/acp-platform.c
index ae63b2e693ab5..3a7a467b70633 100644
--- a/sound/soc/amd/acp/acp-platform.c
+++ b/sound/soc/amd/acp/acp-platform.c
@@ -231,7 +231,7 @@  void config_acp_dma(struct acp_dev_data *adata, struct acp_stream *stream, int s
 			break;
 		default:
 			dev_err(adata->dev, "Invalid dai id %x\n", stream->dai_id);
-			break;
+			return;
 		}
 		break;
 	default: