[PATCH 1/2] UBIFS: Delete an error message for a failed memory allocation in dbg_check_orphans()

From: SF Markus Elfring
Date: Wed Aug 16 2017 - 09:28:41 EST


From: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 16 Aug 2017 10:18:59 +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@xxxxxxxxxxxxxxxxxxxxx>
---
fs/ubifs/orphan.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/fs/ubifs/orphan.c b/fs/ubifs/orphan.c
index caf2d123e9ee..f5b01f9f9985 100644
--- a/fs/ubifs/orphan.c
+++ b/fs/ubifs/orphan.c
@@ -924,10 +924,8 @@ static int dbg_check_orphans(struct ubifs_info *c)
ci.leaf_cnt = 0;
ci.root = RB_ROOT;
ci.node = kmalloc(UBIFS_MAX_INO_NODE_SZ, GFP_NOFS);
- if (!ci.node) {
- ubifs_err(c, "out of memory");
+ if (!ci.node)
return -ENOMEM;
- }

err = dbg_scan_orphans(c, &ci);
if (err)
--
2.14.0