aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ecryptfs/miscdev.c
diff options
context:
space:
mode:
authorMarkus Elfring <[email protected]>2017-08-19 15:37:30 +0000
committerTyler Hicks <[email protected]>2017-11-06 18:23:29 +0000
commit1a0bba4ff086d73a88f9dbadaf4831aefce55f27 (patch)
treed3167aeab094ebdb2a4c710f1e569acf1cf81b83 /fs/ecryptfs/miscdev.c
parenteCryptfs: use after free in ecryptfs_release_messaging() (diff)
downloadkernel-1a0bba4ff086d73a88f9dbadaf4831aefce55f27.tar.gz
kernel-1a0bba4ff086d73a88f9dbadaf4831aefce55f27.zip
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 <[email protected]> Signed-off-by: Tyler Hicks <[email protected]>
Diffstat (limited to 'fs/ecryptfs/miscdev.c')
-rw-r--r--fs/ecryptfs/miscdev.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/fs/ecryptfs/miscdev.c b/fs/ecryptfs/miscdev.c
index 595e684a95a5..f09cacaf8c80 100644
--- a/fs/ecryptfs/miscdev.c
+++ b/fs/ecryptfs/miscdev.c
@@ -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;