Skip to content

Commit

Permalink
kconfig: streamline_config.pl: check defined(ENV variable) before usi…
Browse files Browse the repository at this point in the history
…ng 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>
  • Loading branch information
Randy Dunlap authored and Masahiro Yamada committed Sep 3, 2020
1 parent 91a9d50 commit a73fbfc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scripts/kconfig/streamline_config.pl
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,10 @@ sub loop_select {
}

my %setconfigs;
my @preserved_kconfigs = split(/:/,$ENV{LMC_KEEP});
my @preserved_kconfigs;
if (defined($ENV{'LMC_KEEP'})) {
@preserved_kconfigs = split(/:/,$ENV{LMC_KEEP});
}

sub in_preserved_kconfigs {
my $kconfig = $config2kfile{$_[0]};
Expand Down

0 comments on commit a73fbfc

Please sign in to comment.