Commit 9367bb73 authored by Markus Elfring's avatar Markus Elfring Committed by Linus Torvalds

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/f92aac79-b05e-321a-1a19-d38c7159ee9c@users.sourceforge.netSigned-off-by: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 0547fa58
...@@ -192,13 +192,11 @@ static int decompress_exec( ...@@ -192,13 +192,11 @@ static int decompress_exec(
memset(&strm, 0, sizeof(strm)); memset(&strm, 0, sizeof(strm));
strm.workspace = kmalloc(zlib_inflate_workspacesize(), GFP_KERNEL); strm.workspace = kmalloc(zlib_inflate_workspacesize(), GFP_KERNEL);
if (strm.workspace == NULL) { if (!strm.workspace)
pr_debug("no memory for decompress workspace\n");
return -ENOMEM; return -ENOMEM;
}
buf = kmalloc(LBUFSIZE, GFP_KERNEL); buf = kmalloc(LBUFSIZE, GFP_KERNEL);
if (buf == NULL) { if (!buf) {
pr_debug("no memory for read buffer\n");
retval = -ENOMEM; retval = -ENOMEM;
goto out_free; goto out_free;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment