Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1714997

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

From SF Markus Elfring <elfring@users.sourceforge.net>
Newsgroups linux.kernel
Subject [PATCH 1/3] jfs: Delete an error message for a failed memory allocation in diMount()
Date 2017-08-18 15:40 +0200
Message-ID <ufPFh-4ln-41@gated-at.bofh.it> (permalink)
References <ufPFg-4ln-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

[PATCH 0/3] JFS: Adjustments for several function implementations SF Markus Elfring <elfring@users.sourceforge.net> - 2017-08-18 15:40 +0200
  [PATCH 1/3] jfs: Delete an error message for a failed memory  allocation in diMount() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-08-18 15:40 +0200

csiph-web