[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20241127162904.28182-1-advaitdhamorikar@gmail.com>
Date: Wed, 27 Nov 2024 21:59:04 +0530
From: Advait Dhamorikar <advaitdhamorikar@...il.com>
To: Masahiro Yamada <masahiroy@...nel.org>,
Nathan Chancellor <nathan@...nel.org>,
Nicolas Schier <nicolas@...sle.eu>
Cc: linux-kbuild@...r.kernel.org,
linux-kernel@...r.kernel.org,
Advait Dhamorikar <advaitdhamorikar@...il.com>
Subject: [PATCH-next] modpost: Remove logically dead condition
In case of failure vsnprintf returns `pos`, an unsigned long integer.
An unsigned value can never be negative, so this test will always evaluate
the same way.
Signed-off-by: Advait Dhamorikar <advaitdhamorikar@...il.com>
---
scripts/mod/file2alias.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c
index 81f20ef13a0d..8ce48d7dd36d 100644
--- a/scripts/mod/file2alias.c
+++ b/scripts/mod/file2alias.c
@@ -57,11 +57,6 @@ module_alias_printf(struct module *mod, bool append_wildcard,
n = vsnprintf(NULL, 0, fmt, ap);
va_end(ap);
- if (n < 0) {
- error("vsnprintf failed\n");
- return;
- }
-
len = n + 1; /* extra byte for '\0' */
if (append_wildcard)
--
2.34.1
Powered by blists - more mailing lists