diff --git a/tools/objtool/check.c b/tools/objtool/check.c index 1b7e748170e54..1cff21aef0730 100644 --- a/tools/objtool/check.c +++ b/tools/objtool/check.c @@ -2192,15 +2192,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;