diff options
author | Insu Yun <wuninsu@gmail.com> | 2015-10-21 15:04:47 +0200 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2015-10-21 16:18:35 +0200 |
commit | 27720e75a7a1597252a81dadcd178331c83af861 (patch) | |
tree | f31843c1176e9eb3dfdba8cbab910b3460dd6260 /security/keys | |
parent | certs: add .gitignore to stop git nagging about x509_certificate_list (diff) | |
download | linux-27720e75a7a1597252a81dadcd178331c83af861.tar.xz linux-27720e75a7a1597252a81dadcd178331c83af861.zip |
keys: Be more consistent in selection of union members used
key->description and key->index_key.description are same because
they are unioned. But, for readability, using same name for
duplication and validation seems better.
Signed-off-by: Insu Yun <wuninsu@gmail.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'security/keys')
-rw-r--r-- | security/keys/key.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/security/keys/key.c b/security/keys/key.c index aee2ec5a18fc..c0478465d1ac 100644 --- a/security/keys/key.c +++ b/security/keys/key.c @@ -278,7 +278,7 @@ struct key *key_alloc(struct key_type *type, const char *desc, key->index_key.desc_len = desclen; key->index_key.description = kmemdup(desc, desclen + 1, GFP_KERNEL); - if (!key->description) + if (!key->index_key.description) goto no_memory_3; atomic_set(&key->usage, 1); |