summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-11-07 20:47:28 +0900
committerLinus Torvalds <torvalds@linux-foundation.org>2013-11-07 20:47:28 +0900
commita1212d278c05ca0a38f5cbd7ae90ac2e367228a8 (patch)
tree230f8bad53644f1bdd25e5c0fd892475742e7783 /lib
parent0b1e73ed225d8f7aeef96b74147215ca8b990dce (diff)
Revert "sysfs: drop kobj_ns_type handling"
This reverts commit cb26a311578e67769e92a39a0a63476533cb7e12. It mysteriously causes NetworkManager to not find the wireless device for me. As far as I can tell, Tejun *meant* for this commit to not make any semantic changes, but there clearly are some. So revert it, taking into account some of the calling convention changes that happened in this area in subsequent commits. Cc: Tejun Heo <tj@kernel.org> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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);
}
/*