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: 943116ba2a ("ASoC: add common snd_soc_ret() and use it")
Signed-off-by: Robertus Diawan Chris <robertusdchris@gmail.com>
Link: https://patch.msgid.link/20260519054024.274741-1-robertusdchris@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Robertus Diawan Chris 2026-05-19 12:40:24 +07:00 committed by Mark Brown
parent fd3b95866d
commit 298a43b544
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0

View File

@ -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;