Whamcloud - gitweb
LU-1399 config: check lustre_cfg_new() return
[fs/lustre-release.git] / lustre / ofd / ofd_dev.c
index e3ffc17..82bcafc 100644 (file)
@@ -231,10 +231,8 @@ static void ofd_stack_fini(const struct lu_env *env, struct ofd_device *m,
                strcat(flags, "A");
        lustre_cfg_bufs_set_string(&bufs, 1, flags);
        lcfg = lustre_cfg_new(LCFG_CLEANUP, &bufs);
                strcat(flags, "A");
        lustre_cfg_bufs_set_string(&bufs, 1, flags);
        lcfg = lustre_cfg_new(LCFG_CLEANUP, &bufs);
-       if (!lcfg) {
-               CERROR("Cannot alloc lcfg!\n");
+       if (lcfg == NULL)
                RETURN_EXIT;
                RETURN_EXIT;
-       }
 
        LASSERT(top);
        top->ld_ops->ldo_process_config(env, top, lcfg);
 
        LASSERT(top);
        top->ld_ops->ldo_process_config(env, top, lcfg);