Skip to contentSkip to conversation

ASoC: soc-utils: Add missing va_end in snd_soc_ret()

PATCH In review Robertus Diawan Chris 2 participants 2 messages May 19 – May 22

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: soc-utils: Add missing va_end in snd_soc_ret()

The default case in snd_soc_ret() use va_start without va_end to cleanup "args" object which can cause undefined behavior. So, add missing va_end to cleanup "args" object.

This is reported by Coverity Scan as "Missing varargs init or cleanup".

Fixes 943116ba2a6a ("ASoC: add common snd_soc_ret() and use it")

---
I am still not sure how to test this change. Thank you.

 sound/soc/soc-utils.c | 1 +
 1 file changed, 1 insertion(+)
sound/soc/soc-utils.c +1 -0
index c8adfff826bd..9cb7567e263e 100644
@@ -36,6 +36,7 @@ int snd_soc_ret(const struct device *dev, int ret, const char *fmt, ...)
 		vaf.va = &args;
 
 		dev_err(dev, "ASoC error (%d): %pV", ret, &vaf);
+		va_end(args);
 	}
 
 	return ret;

base-commit: 5200f5f493f79f14bbdc349e402a40dfb32f23c8

Signature · 1 line
2.54.0
maintainer
#1 lore raw
Quoted 1 line · Robertus Diawan Chris

ASoC: soc-utils: Add missing va_end in snd_soc_ret()

Applied to

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

Thanks!

[1/1] ASoC: soc-utils: Add missing va_end in snd_soc_ret()

      https://git.kernel.org/broonie/sound/c/298a43b54432

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