modpost: remove redundant is_vmlinux() test
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Wed, 9 May 2018 09:50:39 +0000 (18:50 +0900)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Thu, 17 May 2018 13:44:59 +0000 (22:44 +0900)
The second test of is_vmlinux() is redundant.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
scripts/mod/modpost.c

index 8606b6caa21b7408f4982bfa98a68b46eb302e89..9e70a6ac1fcb1b592818f3b9456cbe0f67623f9f 100644 (file)
@@ -1971,8 +1971,7 @@ static void read_symbols(char *modname)
                handle_modversions(mod, &info, sym, symname);
                handle_moddevtable(mod, &info, sym, symname);
        }
-       if (!is_vmlinux(modname) ||
-            (is_vmlinux(modname) && vmlinux_section_warnings))
+       if (!is_vmlinux(modname) || vmlinux_section_warnings)
                check_sec_ref(mod, modname, &info);
 
        version = get_modinfo(&info, "version");