mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
KEYS: Delete an error message for a failed memory allocation in get_derived_key()
Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf Signed-off-by: Markus Elfring <[email protected]> Signed-off-by: David Howells <[email protected]> Signed-off-by: James Morris <[email protected]>
This commit is contained in:
parent
4e880168e9
commit
41f1c53e0d
1 changed files with 2 additions and 3 deletions
|
|
@ -385,10 +385,9 @@ static int get_derived_key(u8 *derived_key, enum derived_key_type key_type,
|
|||
derived_buf_len = HASH_SIZE;
|
||||
|
||||
derived_buf = kzalloc(derived_buf_len, GFP_KERNEL);
|
||||
if (!derived_buf) {
|
||||
pr_err("encrypted_key: out of memory\n");
|
||||
if (!derived_buf)
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
if (key_type)
|
||||
strcpy(derived_buf, "AUTH_KEY");
|
||||
else
|
||||
|
|
|
|||
Loading…
Reference in a new issue