Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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.net
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Markus Elfring and committed by
Linus Torvalds
9367bb73 0547fa58

+3 -5
+3 -5
fs/binfmt_flat.c
··· 192 192 193 193 memset(&strm, 0, sizeof(strm)); 194 194 strm.workspace = kmalloc(zlib_inflate_workspacesize(), GFP_KERNEL); 195 - if (strm.workspace == NULL) { 196 - pr_debug("no memory for decompress workspace\n"); 195 + if (!strm.workspace) 197 196 return -ENOMEM; 198 - } 197 + 199 198 buf = kmalloc(LBUFSIZE, GFP_KERNEL); 200 - if (buf == NULL) { 201 - pr_debug("no memory for read buffer\n"); 199 + if (!buf) { 202 200 retval = -ENOMEM; 203 201 goto out_free; 204 202 }