public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Driver Core update for 2.6.4-rc1
Date: Tue, 2 Mar 2004 20:16:38 -0800	[thread overview]
Message-ID: <10782873983442@kroah.com> (raw)
In-Reply-To: <1078287398405@kroah.com>

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


  reply	other threads:[~2004-03-03  4:34 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-03  4:14 [BK PATCH] Driver Core update for 2.6.4-rc1 Greg KH
2004-03-03  4:16 ` [PATCH] " Greg KH
2004-03-03  4:16   ` Greg KH
2004-03-03  4:16     ` Greg KH
2004-03-03  4:16       ` Greg KH
2004-03-03  4:16         ` Greg KH [this message]
2004-03-03  4:16           ` Greg KH
2004-03-03  4:16             ` Greg KH
2004-03-03  4:16               ` Greg KH
2004-03-03  4:16                 ` Greg KH
2004-03-03  4:16                   ` Greg KH
2004-03-03 22:24                     ` Russell King
2004-03-03 23:06                       ` Greg KH
2004-03-03  8:00             ` Christoph Hellwig
2004-03-03 15:07               ` Greg KH
2004-03-03 15:13                 ` Christoph Hellwig
2004-03-03 15:19                   ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=10782873983442@kroah.com \
    --to=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox