public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Davidlohr Bueso <dave@gnu.org>
To: David Howells <dhowells@redhat.com>, LKML <linux-kernel@vger.kernel.org>
Cc: keyrings@linux-nfs.org
Subject: [PATCH] security: keyring: remove redundant NULL check
Date: Mon, 24 Jan 2011 12:37:17 -0300	[thread overview]
Message-ID: <1295883437.2156.1.camel@offworld> (raw)

From: Davidlohr Bueso <dave@gnu.org>
Date: Sun, 23 Jan 2011 22:01:20 -0300

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
---
 security/keys/keyring.c |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/security/keys/keyring.c b/security/keys/keyring.c
index d37f713..cb8110b 100644
--- a/security/keys/keyring.c
+++ b/security/keys/keyring.c
@@ -866,11 +866,10 @@ void __key_link_end(struct key *keyring, struct key_type *type,
 	if (type == &key_type_keyring)
 		up_write(&keyring_serialise_link_sem);
 
-	if (prealloc) {
-		kfree(prealloc);
-		key_payload_reserve(keyring,
-				    keyring->datalen - KEYQUOTA_LINK_BYTES);
-	}
+	kfree(prealloc);
+	key_payload_reserve(keyring,
+			keyring->datalen - KEYQUOTA_LINK_BYTES);
+
 	up_write(&keyring->sem);
 }
 
-- 
1.7.1




             reply	other threads:[~2011-01-24 15:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-24 15:37 Davidlohr Bueso [this message]
2011-01-25 14:35 ` [PATCH] security: keyring: remove redundant NULL check David Howells

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=1295883437.2156.1.camel@offworld \
    --to=dave@gnu.org \
    --cc=dhowells@redhat.com \
    --cc=keyrings@linux-nfs.org \
    --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