diff --git a/tools/objtool/check.c b/tools/objtool/check.c index bae6b261481db..ccf5580442d29 100644 --- a/tools/objtool/check.c +++ b/tools/objtool/check.c @@ -162,7 +162,7 @@ static bool __dead_end_function(struct objtool_file *file, struct symbol *func, return false; insn = find_insn(file, func->sec, func->offset); - if (!insn->func) + if (!insn || !insn->func) return false; func_for_each_insn_all(file, func, insn) {