Merge tag 'mac80211-for-davem-2015-01-06' of git://git.kernel.org/pub/scm/linux/kerne...
[cascardo/linux.git] / lib / kobject.c
index 58751bb..03d4ab3 100644 (file)
@@ -976,7 +976,7 @@ const struct kobj_ns_type_operations *kobj_child_ns_ops(struct kobject *parent)
 {
        const struct kobj_ns_type_operations *ops = NULL;
 
-       if (parent && parent->ktype->child_ns_type)
+       if (parent && parent->ktype && parent->ktype->child_ns_type)
                ops = parent->ktype->child_ns_type(parent);
 
        return ops;