From 72a6b43e4bbb818ac1875a3a572cb2aa8c9af820 Mon Sep 17 00:00:00 2001 From: Heiko Carstens Date: Wed, 27 Feb 2013 16:28:20 +0100 Subject: s390/module: fix compile warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Get rid of this one (false positive): arch/s390/kernel/module.c: In function ‘apply_relocate_add’: arch/s390/kernel/module.c:404:5: warning: ‘rc’ may be used uninitialized in this function [-Wmaybe-uninitialized] arch/s390/kernel/module.c:225:6: note: ‘rc’ was declared here Play safe and preinitialize rc with an error value, so we see an error if new users indeed don't initialize it. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky --- arch/s390/kernel/module.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/s390/kernel') diff --git a/arch/s390/kernel/module.c b/arch/s390/kernel/module.c index f750bd7bd2c..7845e15a17d 100644 --- a/arch/s390/kernel/module.c +++ b/arch/s390/kernel/module.c @@ -222,7 +222,7 @@ static int apply_rela(Elf_Rela *rela, Elf_Addr base, Elf_Sym *symtab, struct mod_arch_syminfo *info; Elf_Addr loc, val; int r_type, r_sym; - int rc; + int rc = -ENOEXEC; /* This is where to make the change */ loc = base + rela->r_offset; -- cgit v1.2.3