diff --git a/scripts/headers_check.pl b/scripts/headers_check.pl
index 56f90a480899dd7bef86b88725b5668160b5fcad..4414c43857ad7ce95f63a8d949c190b4309d816f 100644
--- a/scripts/headers_check.pl
+++ b/scripts/headers_check.pl
@@ -70,7 +70,7 @@ sub check_prototypes
 
 sub check_config
 {
-	if ($line =~ m/[^a-zA-Z0-9_]+CONFIG_([a-zA-Z0-9]+)[^a-zA-Z0-9]/) {
+	if ($line =~ m/[^a-zA-Z0-9_]+CONFIG_([a-zA-Z0-9_]+)[^a-zA-Z0-9_]/) {
 		printf STDERR "$filename:$lineno: leaks CONFIG_$1 to userspace where it is not valid\n";
 	}
 }