]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
kconfig: Delete unnecessary checks before the function call "sym_calc_value"
authorMarkus Elfring <elfring@users.sourceforge.net>
Tue, 7 Jul 2015 19:48:23 +0000 (21:48 +0200)
committerMichal Marek <mmarek@suse.com>
Wed, 19 Aug 2015 14:41:02 +0000 (16:41 +0200)
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: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Michal Marek <mmarek@suse.com>
scripts/kconfig/confdata.c
scripts/kconfig/symbol.c

index c814f57672fc03fb8720127d1527d17264454438..0b7dc2fd7bac0e2985a0b16c023b98cca23325e7 100644 (file)
@@ -268,8 +268,7 @@ int conf_read_simple(const char *name, int def)
                        goto load;
                sym_add_change_count(1);
                if (!sym_defconfig_list) {
-                       if (modules_sym)
-                               sym_calc_value(modules_sym);
+                       sym_calc_value(modules_sym);
                        return 1;
                }
 
@@ -404,9 +403,7 @@ setsym:
        }
        free(line);
        fclose(in);
-
-       if (modules_sym)
-               sym_calc_value(modules_sym);
+       sym_calc_value(modules_sym);
        return 0;
 }
 
index 70c5ee189dce7c7d573c044117d3f63e4450cbcb..50878dc025a5746d51316c6f1bd4c1e1b8a41707 100644 (file)
@@ -467,8 +467,7 @@ void sym_clear_all_valid(void)
        for_all_symbols(i, sym)
                sym->flags &= ~SYMBOL_VALID;
        sym_add_change_count(1);
-       if (modules_sym)
-               sym_calc_value(modules_sym);
+       sym_calc_value(modules_sym);
 }
 
 bool sym_tristate_within_range(struct symbol *sym, tristate val)