Skip to content
Snippets Groups Projects
Commit 35ffd08d authored by Markus Elfring's avatar Markus Elfring Committed by Michal Marek
Browse files

kconfig: Delete unnecessary checks before the function call "sym_calc_value"


The sym_calc_value() function tests whether its argument is NULL and then
returns immediately. Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: default avatarMichal Marek <mmarek@suse.com>
parent d770e558
Branches
Tags
No related merge requests found
...@@ -268,7 +268,6 @@ int conf_read_simple(const char *name, int def) ...@@ -268,7 +268,6 @@ int conf_read_simple(const char *name, int def)
goto load; goto load;
sym_add_change_count(1); sym_add_change_count(1);
if (!sym_defconfig_list) { if (!sym_defconfig_list) {
if (modules_sym)
sym_calc_value(modules_sym); sym_calc_value(modules_sym);
return 1; return 1;
} }
...@@ -404,8 +403,6 @@ int conf_read_simple(const char *name, int def) ...@@ -404,8 +403,6 @@ int conf_read_simple(const char *name, int def)
} }
free(line); free(line);
fclose(in); fclose(in);
if (modules_sym)
sym_calc_value(modules_sym); sym_calc_value(modules_sym);
return 0; return 0;
} }
......
...@@ -467,7 +467,6 @@ void sym_clear_all_valid(void) ...@@ -467,7 +467,6 @@ void sym_clear_all_valid(void)
for_all_symbols(i, sym) for_all_symbols(i, sym)
sym->flags &= ~SYMBOL_VALID; sym->flags &= ~SYMBOL_VALID;
sym_add_change_count(1); sym_add_change_count(1);
if (modules_sym)
sym_calc_value(modules_sym); sym_calc_value(modules_sym);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment