public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] security: keyring: remove redundant NULL check
@ 2011-01-24 15:37 Davidlohr Bueso
  2011-01-25 14:35 ` David Howells
  0 siblings, 1 reply; 2+ messages in thread
From: Davidlohr Bueso @ 2011-01-24 15:37 UTC (permalink / raw)
  To: David Howells, LKML; +Cc: keyrings

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




^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-01-25 14:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-24 15:37 [PATCH] security: keyring: remove redundant NULL check Davidlohr Bueso
2011-01-25 14:35 ` David Howells

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox