Commit f7d1fc56 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

kobject: clean up kobject_get() convoluted logic.

parent 6d739c04
......@@ -425,14 +425,11 @@ void kobject_unregister(struct kobject * kobj)
struct kobject * kobject_get(struct kobject * kobj)
{
struct kobject * ret = kobj;
if (kobj) {
WARN_ON(!atomic_read(&kobj->refcount));
atomic_inc(&kobj->refcount);
} else
ret = NULL;
return ret;
}
return kobj;
}
/**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment