[PATCH] fold me "mm, memory_hotplug: get rid of is_zone_device_section"
From: Michal Hocko
Date: Tue Apr 18 2017 - 03:17:31 EST
- fix remove_memory_section unlock on find_memory_block failure
as per Jerome - spotted by Evgeny Baskakov
---
drivers/base/memory.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/base/memory.c b/drivers/base/memory.c
index 45c25e2e3da4..5ae81617f11d 100644
--- a/drivers/base/memory.c
+++ b/drivers/base/memory.c
@@ -746,7 +746,7 @@ static int remove_memory_section(unsigned long node_id,
*/
mem = find_memory_block(section);
if (!mem)
- return 0;
+ goto out_unlock;
unregister_mem_sect_under_nodes(mem, __section_nr(section));
@@ -756,6 +756,7 @@ static int remove_memory_section(unsigned long node_id,
else
put_device(&mem->dev);
+out_unlock:
mutex_unlock(&mem_sysfs_mutex);
return 0;
}
--
2.11.0
> Between when are you planning on reposting ?
this weak, the sooner the better.
Thanks!
--
Michal Hocko
SUSE Labs