Commit 2b2695f5 authored by Markus Elfring's avatar Markus Elfring Committed by Linus Torvalds
Browse files

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.


Signed-off-by: default avatarMarkus Elfring <>
Cc: Dan Streetman <>
Cc: Seth Jennings <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 9cd1f701
......@@ -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;
Supports Markdown
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