diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-12-13 19:20:27 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-12-13 19:20:27 -0800 |
commit | 252ca494ac75f0dc47469f130d6dc67ed14081f4 (patch) | |
tree | 159e9931af199f8acf50f9982f281ee69ceb7cbf /drivers/base/memory.c | |
parent | 900937c0375efcbb2c9fb2eef50ccb5c98fc99ea (diff) | |
parent | 9f9499ae8e6415cefc4fe0a96ad0e27864353c89 (diff) | |
download | linux-252ca494ac75f0dc47469f130d6dc67ed14081f4.tar.bz2 |
Merge 4.4-rc5 into usb-next as we want those fixes here for testing
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/base/memory.c')
-rw-r--r-- | drivers/base/memory.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/base/memory.c b/drivers/base/memory.c index 2804aed3f416..25425d3f2575 100644 --- a/drivers/base/memory.c +++ b/drivers/base/memory.c @@ -303,6 +303,10 @@ static int memory_subsys_offline(struct device *dev) if (mem->state == MEM_OFFLINE) return 0; + /* Can't offline block with non-present sections */ + if (mem->section_count != sections_per_block) + return -EINVAL; + return memory_block_change_state(mem, MEM_OFFLINE, MEM_ONLINE); } |