diff --git a/tools/objtool/check.c b/tools/objtool/check.c index 4bd30315eb62b..2e154f00ccec2 100644 --- a/tools/objtool/check.c +++ b/tools/objtool/check.c @@ -2592,15 +2592,19 @@ static int validate_branch(struct objtool_file *file, struct symbol *func, break; case INSN_STD: - if (state.df) + if (state.df) { WARN_FUNC("recursive STD", sec, insn->offset); + return 1; + } state.df = true; break; case INSN_CLD: - if (!state.df && func) + if (!state.df && func) { WARN_FUNC("redundant CLD", sec, insn->offset); + return 1; + } state.df = false; break;