lkml.org 
[lkml]   [2017]   [Aug]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH 1/2] UBIFS: Delete an error message for a failed memory allocation in dbg_check_orphans()
From
Date
From: Markus Elfring <elfring@users.sourceforge.net>
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@users.sourceforge.net>
---
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
\
 
 \ /
  Last update: 2017-08-16 15:29    [W:0.037 / U:0.356 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site