summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-omap2/sec-common.c4
1 files changed, 3 insertions, 1 deletions
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++)