mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-11-28 01:52:08 +00:00
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/bae25b04-2ce2-7137-a71c-50d7b4f06431@users.sourceforge.net Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Cc: Dan Streetman <ddstreet@ieee.org> Cc: Seth Jennings <sjenning@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
9cd1f701ce
commit
2b2695f5fd
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user