OSDN Git Service

objtool: Fix function fallthrough detection
[android-x86/kernel.git] / tools / objtool / check.c
index 3ff025b..ae34467 100644 (file)
@@ -1779,7 +1779,8 @@ static int validate_branch(struct objtool_file *file, struct instruction *first,
                        return 1;
                }
 
-               func = insn->func ? insn->func->pfunc : NULL;
+               if (insn->func)
+                       func = insn->func->pfunc;
 
                if (func && insn->ignore) {
                        WARN_FUNC("BUG: why am I validating an ignored function?",