From: Dan Carpenter <dan.carpenter@oracle.com>
To: Nathan Fontenot <nfont@austin.ibm.com>
Cc: linux-kernel@vger.kernel.org, Greg Kroah-Hartman <gregkh@suse.de>,
kernel-janitors@vger.kernel.org
Subject: [patch] memory hotplug: release lock on an error path
Date: Wed, 05 Oct 2011 05:53:26 +0000 [thread overview]
Message-ID: <20111005055326.GA32187@elgon.mountain> (raw)
We need to release the mutex here before returning.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/base/memory.c b/drivers/base/memory.c
index ca8bfe5..164c8a2 100644
--- a/drivers/base/memory.c
+++ b/drivers/base/memory.c
@@ -299,7 +299,7 @@ static int memory_block_change_state(struct memory_block *mem,
for (i = 0; i < sections_per_block; i++) {
ret = check_page_reservations(mem->start_section_nr + i);
if (ret)
- return ret;
+ goto out;
}
}
next reply other threads:[~2011-10-05 5:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-05 5:53 Dan Carpenter [this message]
2011-10-18 21:29 ` [patch] memory hotplug: release lock on an error path Michal Hocko
2011-10-18 22:28 ` Dan Carpenter
2011-10-20 0:20 ` Michal Hocko
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=20111005055326.GA32187@elgon.mountain \
--to=dan.carpenter@oracle.com \
--cc=gregkh@suse.de \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nfont@austin.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