mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-20 13:41:30 +00:00
ecryptfs: Delete 21 error messages for a failed memory allocation
Omit extra messages for a memory allocation failure in these functions. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
This commit is contained in:
parent
db86be3a12
commit
1a0bba4ff0
6 changed files with 7 additions and 59 deletions
|
@ -163,12 +163,8 @@ int ecryptfs_send_miscdev(char *data, size_t data_size,
|
|||
struct ecryptfs_message *msg;
|
||||
|
||||
msg = kmalloc((sizeof(*msg) + data_size), GFP_KERNEL);
|
||||
if (!msg) {
|
||||
printk(KERN_ERR "%s: Out of memory whilst attempting "
|
||||
"to kmalloc(%zd, GFP_KERNEL)\n", __func__,
|
||||
(sizeof(*msg) + data_size));
|
||||
if (!msg)
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
mutex_lock(&msg_ctx->mux);
|
||||
msg_ctx->msg = msg;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue