]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blobdiff - tools/objtool/check.c
objtool: Fail the kernel build on fatal errors
[mirror_ubuntu-jammy-kernel.git] / tools / objtool / check.c
index 4768d91c6d686d26be9fc78cbdf5ac468fbb5cb7..796f6a172efdbdaf52a98ea02504a55d07c458c4 100644 (file)
@@ -2491,8 +2491,14 @@ int check(const char *_objname, bool orc)
 out:
        cleanup(&file);
 
-       /* ignore warnings for now until we get all the code cleaned up */
-       if (ret || warnings)
-               return 0;
+       if (ret < 0) {
+               /*
+                *  Fatal error.  The binary is corrupt or otherwise broken in
+                *  some way, or objtool itself is broken.  Fail the kernel
+                *  build.
+                */
+               return ret;
+       }
+
        return 0;
 }