linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: nimisolo <nimisolo@gmail.com>
To: akpm@linux-foundation.org, kuleshovmail@gmail.com,
	penberg@kernel.org, tony.luck@intel.com, mgorman@suse.de,
	tangchen@cn.fujitsu.com, weiyang@linux.vnet.ibm.com,
	holt@sgi.com
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	nimisolo <nimisolo@gmail.com>
Subject: [PATCH] mm/memblock: If nr_new is 0 just return
Date: Sat,  9 Jan 2016 06:30:23 -0500	[thread overview]
Message-ID: <1452339024-3416-1-git-send-email-nimisolo@gmail.com> (raw)

If nr_new is 0 which means there's no region would be added,
so just return to the caller.

Signed-off-by: nimisolo <nimisolo@gmail.com>
---
 mm/memblock.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/mm/memblock.c b/mm/memblock.c
index d300f13..9a30077 100644
--- a/mm/memblock.c
+++ b/mm/memblock.c
@@ -588,6 +588,9 @@ repeat:
 					       nid, flags);
 	}
 
+	if (!nr_new)
+		return 0;
+
 	/*
 	 * If this was the first round, resize array and repeat for actual
 	 * insertions; otherwise, merge and return.
-- 
2.5.0

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

             reply	other threads:[~2016-01-09 11:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-09 11:30 nimisolo [this message]
  -- strict thread matches above, loose matches on Subject: below --
2016-01-09 11:33 [PATCH] mm/memblock: If nr_new is 0 just return nimisolo
2016-01-12 22:40 ` Andrew Morton

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=1452339024-3416-1-git-send-email-nimisolo@gmail.com \
    --to=nimisolo@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=holt@sgi.com \
    --cc=kuleshovmail@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@suse.de \
    --cc=penberg@kernel.org \
    --cc=tangchen@cn.fujitsu.com \
    --cc=tony.luck@intel.com \
    --cc=weiyang@linux.vnet.ibm.com \
    /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;
as well as URLs for NNTP newsgroup(s).