summaryrefslogtreecommitdiff
path: root/scripts/kconfig/confdata.c
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2023-12-03 19:25:28 +0900
committerMasahiro Yamada <masahiroy@kernel.org>2023-12-28 16:22:47 +0900
commit407868deb2a344e9baa7909e1b13aec35c7217b2 (patch)
treee4a2514f115a507c267a17d8360a844e38e97369 /scripts/kconfig/confdata.c
parent9ad86d747c46f2bdc097c908481647fcdda1d035 (diff)
kconfig: remove redundant NULL pointer check before free()
Passing NULL to free() is allowed and is a no-op. Remove redundant NULL pointer checks. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Diffstat (limited to 'scripts/kconfig/confdata.c')
-rw-r--r--scripts/kconfig/confdata.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
index bd14aae1db58..f1197e672431 100644
--- a/scripts/kconfig/confdata.c
+++ b/scripts/kconfig/confdata.c
@@ -432,8 +432,7 @@ load:
case S_INT:
case S_HEX:
case S_STRING:
- if (sym->def[def].val)
- free(sym->def[def].val);
+ free(sym->def[def].val);
/* fall through */
default:
sym->def[def].val = NULL;