kconfig: remove useless NULL pointer check in conf_write_dep()
[carl9170fw.git] / config / confdata.c
index da208c47fcb844e3101382fdf38dcc9f773d24b8..f6461a6af4bc9a573305b7d1b6e8af5b0997980d 100644 (file)
@@ -927,6 +927,9 @@ int conf_write(const char *name)
                return -1;
        }
 
+       if (make_parent_dir(name))
+               return -1;
+
        env = getenv("KCONFIG_OVERWRITECONFIG");
        if (env && *env) {
                *tmpname = 0;
@@ -1007,8 +1010,6 @@ static int conf_write_dep(const char *name)
        struct file *file;
        FILE *out;
 
-       if (!name)
-               name = ".kconfig.d";
        out = fopen("..config.tmp", "w");
        if (!out)
                return 1;