Revert "sysfs: drop kobj_ns_type handling"
[cascardo/linux.git] / lib / kobject.c
index 7a1c203..5b4b888 100644 (file)
 const void *kobject_namespace(struct kobject *kobj)
 {
        const struct kobj_ns_type_operations *ns_ops = kobj_ns_ops(kobj);
-       const void *ns;
 
        if (!ns_ops || ns_ops->type == KOBJ_NS_TYPE_NONE)
                return NULL;
 
-       ns = kobj->ktype->namespace(kobj);
-       WARN_ON(!ns);   /* @kobj in a namespace is required to have !NULL tag */
-       return ns;
+       return kobj->ktype->namespace(kobj);
 }
 
 /*