diff --git a/tools/objtool/check.c b/tools/objtool/check.c index 66f7c01385a47d2dc8e209b921f254ca4e33f653..a966b22a32ef96d6f777000282b88f27387e6bd8 100644 --- a/tools/objtool/check.c +++ b/tools/objtool/check.c @@ -932,7 +932,7 @@ static int add_jump_table(struct objtool_file *file, struct instruction *insn, break; /* Make sure the destination is in the same function: */ - if (dest_insn->func->pfunc != pfunc) + if (!dest_insn->func || dest_insn->func->pfunc != pfunc) break; alt = malloc(sizeof(*alt));