All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] security: keys: remove redundant assignment to key_ref
@ 2017-12-04 18:14 ` Colin King
  0 siblings, 0 replies; 15+ messages in thread
From: Colin King @ 2017-12-04 18:14 UTC (permalink / raw)
  To: linux-security-module

From: Colin Ian King <colin.king@canonical.com>

Variable key_ref is being assigned a value that is never read;
key_ref is being re-assigned a few statements later.  Hence this
assignment is redundant and can be removed.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 security/keys/key.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/security/keys/key.c b/security/keys/key.c
index 66049183ad89..d97c9394b5dd 100644
--- a/security/keys/key.c
+++ b/security/keys/key.c
@@ -833,7 +833,6 @@ key_ref_t key_create_or_update(key_ref_t keyring_ref,
 
 	key_check(keyring);
 
-	key_ref = ERR_PTR(-EPERM);
 	if (!(flags & KEY_ALLOC_BYPASS_RESTRICTION))
 		restrict_link = keyring->restrict_link;
 
-- 
2.14.1


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

end of thread, other threads:[~2017-12-07  0:50 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-04 18:14 [PATCH] security: keys: remove redundant assignment to key_ref Colin King
2017-12-04 18:14 ` Colin King
2017-12-04 18:14 ` Colin King
2017-12-05  0:18 ` James Morris
2017-12-05  0:18   ` James Morris
2017-12-05  0:18   ` James Morris
2017-12-06 14:50 ` David Howells
2017-12-06 14:50   ` David Howells
2017-12-06 14:50   ` David Howells
2017-12-06 14:53   ` Julia Lawall
2017-12-06 14:53     ` Julia Lawall
2017-12-06 14:53     ` Julia Lawall
2017-12-07  0:49     ` James Morris
2017-12-07  0:49       ` James Morris
2017-12-07  0:49       ` James Morris

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.