diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2017-05-26 11:32:04 +1000 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2017-05-29 09:22:20 +1000 |
commit | e85191bb9eb597f27effb4b5e6fc52fe2f3149a8 (patch) | |
tree | 37ac57245f20918eac6d84c2422a1df55c0246e4 | |
parent | bb7b4cd463a048de53144f188f27ccfbf9e7f090 (diff) |
mm/zswap.c: delete an error message for a failed memory allocation in zswap_pool_create()
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/2345aabc-ae98-1d31-afba-40a02c5baf3d@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>
-rw-r--r-- | mm/zswap.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/mm/zswap.c b/mm/zswap.c index eedc27894b10..18d8e87119a6 100644 --- a/mm/zswap.c +++ b/mm/zswap.c @@ -515,10 +515,8 @@ static struct zswap_pool *zswap_pool_create(char *type, char *compressor) } pool = kzalloc(sizeof(*pool), GFP_KERNEL); - if (!pool) { - pr_err("pool alloc failed\n"); + if (!pool) return NULL; - } /* unique name for each pool specifically required by zsmalloc */ snprintf(name, 38, "zswap%x", atomic_inc_return(&zswap_pools_count)); |