Skip to content

Commit a73fbfc

Browse files
rddunlapmasahir0y
authored andcommitted
kconfig: streamline_config.pl: check defined(ENV variable) before using it
A user reported: 'Use of uninitialized value $ENV{"LMC_KEEP"} in split at ./scripts/kconfig/streamline_config.pl line 596.' so first check that $ENV{LMC_KEEP} is defined before trying to use it. Fixes: c027b02 ("streamline_config.pl: add LMC_KEEP to preserve some kconfigs") Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
1 parent 91a9d50 commit a73fbfc

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎scripts/kconfig/streamline_config.pl‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,10 @@ sub loop_select {
593593
}
594594

595595
my %setconfigs;
596-
my @preserved_kconfigs = split(/:/,$ENV{LMC_KEEP});
596+
my @preserved_kconfigs;
597+
if (defined($ENV{'LMC_KEEP'})) {
598+
@preserved_kconfigs = split(/:/,$ENV{LMC_KEEP});
599+
}
597600

598601
sub in_preserved_kconfigs {
599602
my $kconfig = $config2kfile{$_[0]};

0 commit comments

Comments
 (0)