ChangeSet 1.1612.17.4, 2004/02/27 11:18:21-08:00, greg@kroah.com kobject: clean up kobject_get() convoluted logic. lib/kobject.c | 7 ++----- 1 files changed, 2 insertions(+), 5 deletions(-) diff -Nru a/lib/kobject.c b/lib/kobject.c --- a/lib/kobject.c Tue Mar 2 19:50:26 2004 +++ b/lib/kobject.c Tue Mar 2 19:50:26 2004 @@ -425,14 +425,11 @@ 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; } /**