Skip to content

Commit

Permalink
keys: Be more consistent in selection of union members used
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: David Howells <[email protected]>
  • Loading branch information
insuyun authored and dhowells committed Oct 21, 2015
1 parent 48dbc16 commit 27720e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion security/keys/key.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 27720e7

Please sign in to comment.