[PATCH] security: keyring: remove redundant NULL check

From: Davidlohr Bueso
Date: Mon Jan 24 2011 - 10:37:29 EST


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

Signed-off-by: Davidlohr Bueso <dave@xxxxxxx>
---
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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/