mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: SF Markus Elfring <elfring@users.sourceforge.net>
To: linux-mtd@lists.infradead.org,
	Adrian Hunter <adrian.hunter@intel.com>,
	Artem Bityutskiy <dedekind1@gmail.com>,
	Richard Weinberger <richard@nod.at>
Cc: LKML <linux-kernel@vger.kernel.org>, kernel-janitors@vger.kernel.org
Subject: [PATCH 1/2] UBIFS: Delete an error message for a failed memory allocation in dbg_check_orphans()
Date: Wed, 16 Aug 2017 15:27:54 +0200	[thread overview]
Message-ID: <a387b1b9-471c-71b5-88f6-c448857f403b@users.sourceforge.net> (raw)
In-Reply-To: <bd8107ce-fc62-db39-8134-59dca314da7c@users.sourceforge.net>

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

  reply	other threads:[~2017-08-16 13:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-16 13:26 [PATCH 0/2] UBIFS: Adjustments for some function implementations SF Markus Elfring
2017-08-16 13:27 ` SF Markus Elfring [this message]
2017-08-16 13:30 ` [PATCH 2/2] UBIFS: Improve 19 size determinations SF Markus Elfring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a387b1b9-471c-71b5-88f6-c448857f403b@users.sourceforge.net \
    --to=elfring@users.sourceforge.net \
    --cc=adrian.hunter@intel.com \
    --cc=dedekind1@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=richard@nod.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®