aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/kobject.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/kobject.c b/lib/kobject.c
index 7a1c203083eb..5b4b8886435e 100644
--- a/lib/kobject.c
+++ b/lib/kobject.c
@@ -30,14 +30,11 @@
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);
}
/*