Skip to contentSkip to conversation

arm: omap-common: add missing va_end()

PATCH In review Heinrich Schuchardt 2 participants 3 messages Apr 15, 2017 – Apr 19, 2017

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

PATCH 1/1 arm: omap-common: add missing va_end()

Each call of va_start must be matched by a call of va_end.

---
 arch/arm/mach-omap2/sec-common.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
arch/arm/mach-omap2/sec-common.c +3 -1
index 0fa8db05fe..ec1ffa556a 100644
@@ -39,8 +39,10 @@ u32 secure_rom_call(u32 service, u32 proc_id, u32 flag, ...)
 
 	num_args = va_arg(ap, u32);
 
-	if (num_args > 4)
+	if (num_args > 4) {
+		va_end(ap);
 		return 1;
+	}
 
 	/* Copy args to aligned args structure */
 	for (i = 0; i < num_args; i++)
Signature · 1 line
2.11.0
#1 lore raw

PATCH 1/1 arm: omap-common: add missing va_end()

Quoted 3 lines · Heinrich Schuchardt

Each call of va_start must be matched by a call of va_end.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170415/2961027f/attachment.sig>
#2 lore raw
In reply to Heinrich Schuchardt
Quoted 4 lines · xypron.glpk at gmx.de

Each call of va_start must be matched by a call of va_end.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170419/2814df80/attachment.sig>