Re: [PATCH] Driver Core update for 2.6.4-rc1

From: Greg KH
Date: Tue Mar 02 2004 - 23:48:42 EST


ChangeSet 1.1612.17.4, 2004/02/27 11:18:21-08:00, greg@xxxxxxxxx

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;
}

/**

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/