[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1295883437.2156.1.camel@offworld>
Date: Mon, 24 Jan 2011 12:37:17 -0300
From: Davidlohr Bueso <dave@....org>
To: David Howells <dhowells@...hat.com>,
LKML <linux-kernel@...r.kernel.org>
Cc: keyrings@...ux-nfs.org
Subject: [PATCH] security: keyring: remove redundant NULL check
From: Davidlohr Bueso <dave@....org>
Date: Sun, 23 Jan 2011 22:01:20 -0300
Signed-off-by: Davidlohr Bueso <dave@....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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists