diff options
| author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2013-02-27 10:28:20 -0500 |
|---|---|---|
| committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2013-02-28 03:37:13 -0500 |
| commit | 72a6b43e4bbb818ac1875a3a572cb2aa8c9af820 (patch) | |
| tree | 361f3d6f88c2c864d81258970ecb559d28b01f04 /arch | |
| parent | aa2383f815c3720f1f406d2f574dfb65aedce2ec (diff) | |
s390/module: fix compile warning
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 <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch')
| -rw-r--r-- | arch/s390/kernel/module.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/s390/kernel/module.c b/arch/s390/kernel/module.c index f750bd7bd2c2..7845e15a17df 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, | |||
| 222 | struct mod_arch_syminfo *info; | 222 | struct mod_arch_syminfo *info; |
| 223 | Elf_Addr loc, val; | 223 | Elf_Addr loc, val; |
| 224 | int r_type, r_sym; | 224 | int r_type, r_sym; |
| 225 | int rc; | 225 | int rc = -ENOEXEC; |
| 226 | 226 | ||
| 227 | /* This is where to make the change */ | 227 | /* This is where to make the change */ |
| 228 | loc = base + rela->r_offset; | 228 | loc = base + rela->r_offset; |
