diff options
author | Markus Elfring <[email protected]> | 2017-09-08 16:16:14 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2017-09-08 18:26:50 -0700 |
commit | 9367bb730e4d9d85a8911a08a3542ec2aa873d37 (patch) | |
tree | 16f118f6cccfbf7af82b6879c9cf5a5088bfe02b | |
parent | 0547fa5851c921eb1f64286f6b2ae7ab5df24e6e (diff) |
binfmt_flat: delete two error messages for a failed memory allocation in decompress_exec()
Omit extra messages for a memory allocation failure in this function.
This issue was detected by using the Coccinelle software.
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Markus Elfring <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r-- | fs/binfmt_flat.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/binfmt_flat.c b/fs/binfmt_flat.c index 604a176df0c2..ce6537c50ec1 100644 --- a/fs/binfmt_flat.c +++ b/fs/binfmt_flat.c @@ -192,13 +192,11 @@ static int decompress_exec( memset(&strm, 0, sizeof(strm)); strm.workspace = kmalloc(zlib_inflate_workspacesize(), GFP_KERNEL); - if (strm.workspace == NULL) { - pr_debug("no memory for decompress workspace\n"); + if (!strm.workspace) return -ENOMEM; - } + buf = kmalloc(LBUFSIZE, GFP_KERNEL); - if (buf == NULL) { - pr_debug("no memory for read buffer\n"); + if (!buf) { retval = -ENOMEM; goto out_free; } |