[PATCH 1/3] jfs: Delete an error message for a failed memory allocation in diMount()

SF Markus Elfring via Jfs-discussion <[email protected]>
Newsgroups gmane.comp.file-systems.jfs.general
Message-ID <12f705e1-7ba2-af59-b86d-91134153dca9__48375.1901578673$1503063396$gmane$org@users.sourceforge.net>
From: Markus Elfring <[email protected]>
Date: Fri, 18 Aug 2017 09:19:24 +0200

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]>
---
 fs/jfs/jfs_imap.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/fs/jfs/jfs_imap.c b/fs/jfs/jfs_imap.c
index f36ef68905a7..da8051299e47 100644
--- a/fs/jfs/jfs_imap.c
+++ b/fs/jfs/jfs_imap.c
@@ -119,7 +119,5 @@ int diMount(struct inode *ipimap)
-	if (imap == NULL) {
-		jfs_err("diMount: kmalloc returned NULL!");
+	if (!imap)
 		return -ENOMEM;
-	}
 
 	/* read the on-disk inode map control structure. */
 
-- 
2.14.0


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.