mm-commits.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch 098/108] mm/zswap.c: delete an error message for a failed memory allocation in zswap_pool_create()
@ 2017-07-06 22:40 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2017-07-06 22:40 UTC (permalink / raw)
  To: akpm, ddstreet, elfring, mm-commits, sjenning, torvalds

From: Markus Elfring <elfring@users.sourceforge.net>
Subject: 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>
---

 mm/zswap.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff -puN mm/zswap.c~zswap-delete-an-error-message-for-a-failed-memory-allocation-in-zswap_pool_create mm/zswap.c
--- a/mm/zswap.c~zswap-delete-an-error-message-for-a-failed-memory-allocation-in-zswap_pool_create
+++ a/mm/zswap.c
@@ -515,10 +515,8 @@ static struct zswap_pool *zswap_pool_cre
 	}
 
 	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));
_

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-07-06 22:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-06 22:40 [patch 098/108] mm/zswap.c: delete an error message for a failed memory allocation in zswap_pool_create() akpm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).