public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] memory hotplug: release lock on an error path
@ 2011-10-05  5:53 Dan Carpenter
  2011-10-18 21:29 ` Michal Hocko
  0 siblings, 1 reply; 4+ messages in thread
From: Dan Carpenter @ 2011-10-05  5:53 UTC (permalink / raw)
  To: Nathan Fontenot; +Cc: linux-kernel, Greg Kroah-Hartman, kernel-janitors

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;
 		}
 	}


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-10-20  0:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-05  5:53 [patch] memory hotplug: release lock on an error path Dan Carpenter
2011-10-18 21:29 ` Michal Hocko
2011-10-18 22:28   ` Dan Carpenter
2011-10-20  0:20     ` Michal Hocko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox