+ struct kobject *ret = NULL;
+ struct kobject *k;
+
+ spin_lock(&kset->list_lock);
+
+ list_for_each_entry(k, &kset->list, entry) {
+ if (kobject_name(k) && !strcmp(kobject_name(k), name)) {
+ if (kref_get_unless_zero(&k->kref))
+ ret = k;
+ break;
+ }
+ }
+
+ spin_unlock(&kset->list_lock);
+ return ret;