kconfig: streamline_config.pl: check defined(ENV variable) before using it
authorRandy Dunlap <rdunlap@infradead.org>
Wed, 26 Aug 2020 21:21:43 +0000 (14:21 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Sep 2020 17:14:33 +0000 (19:14 +0200)
commit55eb0f42f465640fe687d15cdf7677cfb642909c
treeb7976cd3bb36b61bc93f58d42a29489ed8d35cd4
parent8c4c56846892f7dd3f3b3e31e5e0db051d5bcf0f
kconfig: streamline_config.pl: check defined(ENV variable) before using it

commit a73fbfce2cc28883f659414d598e6e60ca2214b4 upstream.

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 <rdunlap@infradead.org>
Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
scripts/kconfig/streamline_config.pl