diff mbox series

[1/1] coredump: remove unnecessary oom message

Message ID 20210617084404.1170-1-thunder.leizhen@huawei.com (mailing list archive)
State New
Headers show
Series [1/1] coredump: remove unnecessary oom message | expand

Commit Message

Zhen Lei June 17, 2021, 8:44 a.m. UTC
Fixes scripts/checkpatch.pl warning:
WARNING: Possible unnecessary 'out of memory' message

Remove it can help us save a bit of memory.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
---
 fs/coredump.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/fs/coredump.c b/fs/coredump.c
index 07afb5ddb1c4..a693e9230fb6 100644
--- a/fs/coredump.c
+++ b/fs/coredump.c
@@ -679,11 +679,8 @@  void do_coredump(const kernel_siginfo_t *siginfo)
 
 		helper_argv = kmalloc_array(argc + 1, sizeof(*helper_argv),
 					    GFP_KERNEL);
-		if (!helper_argv) {
-			printk(KERN_WARNING "%s failed to allocate memory\n",
-			       __func__);
+		if (!helper_argv)
 			goto fail_dropcount;
-		}
 		for (argi = 0; argi < argc; argi++)
 			helper_argv[argi] = cn.corename + argv[argi];
 		helper_argv[argi] = NULL;