summaryrefslogtreecommitdiffstats
path: root/fs/binfmt_flat.c
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2017-09-08 19:16:14 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2017-09-08 21:26:50 -0400
commit9367bb730e4d9d85a8911a08a3542ec2aa873d37 (patch)
tree16f118f6cccfbf7af82b6879c9cf5a5088bfe02b /fs/binfmt_flat.c
parent0547fa5851c921eb1f64286f6b2ae7ab5df24e6e (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/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>
Diffstat (limited to 'fs/binfmt_flat.c')
-rw-r--r--fs/binfmt_flat.c8
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(
192 192
193 memset(&strm, 0, sizeof(strm)); 193 memset(&strm, 0, sizeof(strm));
194 strm.workspace = kmalloc(zlib_inflate_workspacesize(), GFP_KERNEL); 194 strm.workspace = kmalloc(zlib_inflate_workspacesize(), GFP_KERNEL);
195 if (strm.workspace == NULL) { 195 if (!strm.workspace)
196 pr_debug("no memory for decompress workspace\n");
197 return -ENOMEM; 196 return -ENOMEM;
198 } 197
199 buf = kmalloc(LBUFSIZE, GFP_KERNEL); 198 buf = kmalloc(LBUFSIZE, GFP_KERNEL);
200 if (buf == NULL) { 199 if (!buf) {
201 pr_debug("no memory for read buffer\n");
202 retval = -ENOMEM; 200 retval = -ENOMEM;
203 goto out_free; 201 goto out_free;
204 } 202 }