Skip to contentSkip to conversation

ASoC: soc-core: Fix the error return code in snd_soc_of_parse_audio_routing()

PATCH In review Zhen Lei 2 participants 2 messages Jun 17, 2021

Subsystems (2)
lore
Share & tools
lore

Zhen Lei

author
#0 lore raw

PATCH 1/1 ASoC: soc-core: Fix the error return code in snd_soc_of_parse_audio_routing()

When devm_kcalloc() fails, the error code -ENOMEM should be returned instead of -EINVAL.

---
 sound/soc/soc-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/soc-core.c +1 -1
index 9e7f4ceffb65..dbf7de925f8d 100644
@@ -2957,7 +2957,7 @@ int snd_soc_of_parse_audio_routing(struct snd_soc_card *card,
 	if (!routes) {
 		dev_err(card->dev,
 			"ASoC: Could not allocate DAPM route table\n");
-		return -EINVAL;
+		return -ENOMEM;
 	}
 
 	for (i = 0; i < num_routes; i++) {
Signature · 1 line
2.25.1
maintainer
#1 lore raw
Quoted 2 lines · Zhen Lei

When devm_kcalloc() fails, the error code -ENOMEM should be returned instead of -EINVAL.

Applied to

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

Thanks!

[1/1] ASoC: soc-core: Fix the error return code in snd_soc_of_parse_audio_routing()

      commit: 7d3865a10b9ff2669c531d5ddd60bf46b3d48f1e

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