aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Elfring <[email protected]>2017-07-06 15:40:40 -0700
committerLinus Torvalds <[email protected]>2017-07-06 16:24:35 -0700
commit2b2695f5fdf185092a72c81ca2c09ed1b9b37416 (patch)
tree71eb8eec757526ffe697e856e957ea59ff42de0e
parent9cd1f701ce47599ddfb589afeb88b5513b6915bc (diff)
mm/zswap.c: delete an error message for a failed memory allocation in zswap_dstmem_prepare()
Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Markus Elfring <[email protected]> Cc: Dan Streetman <[email protected]> Cc: Seth Jennings <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r--mm/zswap.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/mm/zswap.c b/mm/zswap.c
index a6e67633be03..d39581a076c3 100644
--- a/mm/zswap.c
+++ b/mm/zswap.c
@@ -371,10 +371,9 @@ static int zswap_dstmem_prepare(unsigned int cpu)
u8 *dst;
dst = kmalloc_node(PAGE_SIZE * 2, GFP_KERNEL, cpu_to_node(cpu));
- if (!dst) {
- pr_err("can't allocate compressor buffer\n");
+ if (!dst)
return -ENOMEM;
- }
+
per_cpu(zswap_dstmem, cpu) = dst;
return 0;
}