From: Randy Dunlap <[email protected]>

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: c027b02d89fd ("streamline_config.pl: add LMC_KEEP to preserve some 
kconfigs")
Signed-off-by: Randy Dunlap <[email protected]>
Cc: Changbin Du <[email protected]>
Cc: Steven Rostedt (VMware) <[email protected]>
Cc: Masahiro Yamada <[email protected]>
Acked-by: Steven Rostedt (VMware) <[email protected]>
---
 scripts/kconfig/streamline_config.pl |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

--- linux-next-20200825.orig/scripts/kconfig/streamline_config.pl
+++ linux-next-20200825/scripts/kconfig/streamline_config.pl
@@ -593,7 +593,10 @@ while ($repeat) {
 }
 
 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]};

Reply via email to