projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9cd1f70
)
mm/zswap.c: delete an error message for a failed memory allocation in zswap_dstmem_pr...
author
Markus Elfring
<elfring@users.sourceforge.net>
Thu, 6 Jul 2017 22:40:40 +0000
(15:40 -0700)
committer
Linus Torvalds
<torvalds@linux-foundation.org>
Thu, 6 Jul 2017 23:24:35 +0000
(16:24 -0700)
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>
mm/zswap.c
patch
|
blob
|
blame
|
history
diff --git
a/mm/zswap.c
b/mm/zswap.c
index a6e67633be0392ef09f8c4cae428d257b4a85f9f..d39581a076c3aed1e9db7b2408c3f8da9ef60415 100644
(file)
--- 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;
}