summaryrefslogtreecommitdiff
path: root/tools/objtool/check.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/objtool/check.c')
-rw-r--r--tools/objtool/check.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index 0fcf99c91400..98e6c3b5fefc 100644
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -4514,6 +4514,7 @@ static int validate_sls(struct objtool_file *file)
static int validate_reachable_instructions(struct objtool_file *file)
{
struct instruction *insn;
+ int warnings = 0;
if (file->ignore_unreachables)
return 0;
@@ -4523,10 +4524,10 @@ static int validate_reachable_instructions(struct objtool_file *file)
continue;
WARN_INSN(insn, "unreachable instruction");
- return 1;
+ warnings++;
}
- return 0;
+ return warnings;
}
int check(struct objtool_file *file)