mm/zswap.c: delete an error message for a failed memory allocation in zswap_dstmem_prepare()
Subsystems (3)
[email protected]
maintainerPATCH 100/108 mm/zswap.c: delete an error message for a failed memory allocation in zswap_dstmem_prepare()
From: Markus Elfring <[email protected]>
Subject: 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 Markus Elfring <[email protected]>
Cc Dan Streetman <[email protected]>
Cc Seth Jennings <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
mm/zswap.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
mm/zswap.c renamed from mm/zswap.c~zswap-delete-an-error-message-for-a-failed-memory-allocation-in-zswap_dstmem_prepare +2 -3
@@ -371,10 +371,9 @@ static int zswap_dstmem_prepare(unsignedu8 *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 ; }
_