Linux Kernel Mentees list
 help / color / mirror / Atom feed
* [PATCH] ASoC: soc-utils: Add missing va_end in snd_soc_ret()
@ 2026-05-19  5:40 Robertus Diawan Chris
  2026-05-19 14:57 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Robertus Diawan Chris @ 2026-05-19  5:40 UTC (permalink / raw)
  To: lgirdwood, broonie, perex, tiwai
  Cc: linux-sound, linux-kernel, linux-kernel-mentees, skhan, me

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")
Signed-off-by: Robertus Diawan Chris <robertusdchris@gmail.com>
---
I am still not sure how to test this change. Thank you.

 sound/soc/soc-utils.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sound/soc/soc-utils.c b/sound/soc/soc-utils.c
index c8adfff826bd..9cb7567e263e 100644
--- a/sound/soc/soc-utils.c
+++ b/sound/soc/soc-utils.c
@@ -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
-- 
2.54.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-05-22 10:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-19  5:40 [PATCH] ASoC: soc-utils: Add missing va_end in snd_soc_ret() Robertus Diawan Chris
2026-05-19 14:57 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox