diff --git a/scripts/dtc/dt-check-style b/scripts/dtc/dt-check-style index 41c97d996882..a36c45c29476 100755 --- a/scripts/dtc/dt-check-style +++ b/scripts/dtc/dt-check-style @@ -91,7 +91,8 @@ class DtsLine: self.indent_str = indent_str # leading whitespace as-is self.depth = depth self.stripped = stripped # Code without indentation - self.code = _strip_strings_and_comments(stripped) # Only the code, skipping trailing comments + # Only the code, skipping trailing comments and space between code and trailing comment + self.code = _strip_strings_and_comments(stripped).rstrip() self.is_root = is_root self.prop_name = None self.continuations = []