page-allocator: add inactive ratio calculation function of each zone
[sfrench/cifs-2.6.git] / lib / kobject.c
index a6dec32f2ddd5f683c5d1295358dc11842ebd2e7..bacf6fe4f7a0347bb958ebc85a059ab582eb93b4 100644 (file)
@@ -218,6 +218,9 @@ int kobject_set_name_vargs(struct kobject *kobj, const char *fmt,
        const char *old_name = kobj->name;
        char *s;
 
+       if (kobj->name && !fmt)
+               return 0;
+
        kobj->name = kvasprintf(GFP_KERNEL, fmt, vargs);
        if (!kobj->name)
                return -ENOMEM;