diff mbox

[U-Boot] arm: omap-common: add missing va_end()

Message ID 20170415102920.16559-1-xypron.glpk@gmx.de
State Accepted
Commit 1ecd2a2f0600e61f2edff4fc3dce76f0f6559b67
Delegated to: Tom Rini
Headers show

Commit Message

Heinrich Schuchardt April 15, 2017, 10:29 a.m. UTC
Each call of va_start must be matched by a call of va_end.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
 arch/arm/mach-omap2/sec-common.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Tom Rini April 15, 2017, 4:11 p.m. UTC | #1
On Sat, Apr 15, 2017 at 12:29:20PM +0200, Heinrich Schuchardt wrote:

> Each call of va_start must be matched by a call of va_end.
> 
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>

Reviewed-by: Tom Rini <trini@konsulko.com>
Tom Rini April 19, 2017, 1:03 p.m. UTC | #2
On Sat, Apr 15, 2017 at 12:29:20PM +0200, xypron.glpk@gmx.de wrote:

> Each call of va_start must be matched by a call of va_end.
> 
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> Reviewed-by: Tom Rini <trini@konsulko.com>

Applied to u-boot/master, thanks!
diff mbox

Patch

diff --git a/arch/arm/mach-omap2/sec-common.c b/arch/arm/mach-omap2/sec-common.c
index 0fa8db05fe..ec1ffa556a 100644
--- a/arch/arm/mach-omap2/sec-common.c
+++ b/arch/arm/mach-omap2/sec-common.c
@@ -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++)