[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20241206092346.6003-1-liujing@cmss.chinamobile.com>
Date: Fri, 6 Dec 2024 17:23:46 +0800
From: liujing <liujing@...s.chinamobile.com>
To: davem@...emloft.net,
andreas@...sler.com
Cc: sparclinux@...r.kernel.org,
linux-kernel@...r.kernel.org,
liujing <liujing@...s.chinamobile.com>
Subject: [PATCH] sparc: Move va_end() before exit()
There is a static checker warning, so move the va_end call before
exit(1). Since the exit(1) function terminates the program, any code
after exit(1) is unreachable thus notexecuted. Placing va_end() before
exit() ensures that the va_list is properly cleaned up.
Signed-off-by: liujing <liujing@...s.chinamobile.com>
---
V1 -> V2: Modify the commit information and title description
diff --git a/arch/sparc/vdso/vdso2c.c b/arch/sparc/vdso/vdso2c.c
index dc81240aab6f..372e3330850a 100644
--- a/arch/sparc/vdso/vdso2c.c
+++ b/arch/sparc/vdso/vdso2c.c
@@ -90,8 +90,8 @@ static void fail(const char *format, ...)
vfprintf(stderr, format, ap);
if (outfilename)
unlink(outfilename);
- exit(1);
va_end(ap);
+ exit(1);
}
/*
--
2.27.0
Powered by blists - more mailing lists