]> git.itanic.dy.fi Git - linux-stable/commit
kconfig: default to zero if int/hex symbol lacks default property
authorMasahiro Yamada <masahiroy@kernel.org>
Sat, 25 Nov 2023 16:35:59 +0000 (01:35 +0900)
committerMasahiro Yamada <masahiroy@kernel.org>
Sun, 3 Dec 2023 10:01:25 +0000 (19:01 +0900)
commit6262afa10ef7cc8fdf39b81a36f9546b68810431
tree53ab8ef7d3468722586c718a28c38a004c98f6c6
parent4e244c10eab345a735c5052688e4a55bddce5bf7
kconfig: default to zero if int/hex symbol lacks default property

When a default property is missing in an int or hex symbol, it defaults
to an empty string, which is not a valid symbol value.

It results in an incorrect .config, and can also lead to an infinite
loop in scripting.

Use "0" for int and "0x0" for hex as a default value.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Yoann Congal <yoann.congal@smile.fr>
scripts/kconfig/symbol.c