]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - tools/objtool/check.c
Merge branch 'linus' into core/objtool, to pick up dependent fixes
[mirror_ubuntu-bionic-kernel.git] / tools / objtool / check.c
index c0e26ad1fa7e3dbd212b3a4fd02fbcc4d8afc74c..9b341584eb1b56b05761bea127ee6cf94eacc190 100644 (file)
@@ -1757,11 +1757,14 @@ static int validate_branch(struct objtool_file *file, struct instruction *first,
                if (insn->dead_end)
                        return 0;
 
-               insn = next_insn;
-               if (!insn) {
+               if (!next_insn) {
+                       if (state.cfa.base == CFI_UNDEFINED)
+                               return 0;
                        WARN("%s: unexpected end of section", sec->name);
                        return 1;
                }
+
+               insn = next_insn;
        }
 
        return 0;