diff --git a/scripts/kernel-doc b/scripts/kernel-doc index b2d2f5849ed0..d804e4de5d99 100755 --- a/scripts/kernel-doc +++ b/scripts/kernel-doc @@ -2312,7 +2312,6 @@ sub process_inline($$) { sub process_file($) { my $file; - my $initial_section_counter = $section_counter; my ($orig_file) = @_; $file = map_filename($orig_file); @@ -2350,8 +2349,7 @@ sub process_file($) { } # Make sure we got something interesting. - if ($initial_section_counter == $section_counter && $ - output_mode ne "none") { + if (!$section_counter && $output_mode ne "none") { if ($output_selection == OUTPUT_INCLUDE) { emit_warning("${file}:1", "'$_' not found\n") for keys %function_table;