mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
KEYS: remove a bogus NULL check
We already checked if "desc" was NULL at the beginning of the function and we've dereferenced it so this causes a static checker warning. Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: David Howells <[email protected]> Signed-off-by: James Morris <[email protected]>
This commit is contained in:
parent
d0bffab043
commit
5057975ae3
1 changed files with 4 additions and 6 deletions
|
|
@ -276,12 +276,10 @@ struct key *key_alloc(struct key_type *type, const char *desc,
|
|||
if (!key)
|
||||
goto no_memory_2;
|
||||
|
||||
if (desc) {
|
||||
key->index_key.desc_len = desclen;
|
||||
key->index_key.description = kmemdup(desc, desclen + 1, GFP_KERNEL);
|
||||
if (!key->description)
|
||||
goto no_memory_3;
|
||||
}
|
||||
key->index_key.desc_len = desclen;
|
||||
key->index_key.description = kmemdup(desc, desclen + 1, GFP_KERNEL);
|
||||
if (!key->description)
|
||||
goto no_memory_3;
|
||||
|
||||
atomic_set(&key->usage, 1);
|
||||
init_rwsem(&key->sem);
|
||||
|
|
|
|||
Loading…
Reference in a new issue