Revert "sysfs: drop kobj_ns_type handling"
[linux-drm-fsl-dcu.git] / lib / kobject.c
index 7a1c203083eb59e6e17db1af3e942a1351e756f7..5b4b8886435ec77c7f51ff0221b3bc01558e5798 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);
 }
 
 /*