Skip to content

Commit

Permalink
Merge tag 'driver-core-3.12-rc6' of git://git.kernel.org/pub/scm/linu…
Browse files Browse the repository at this point in the history
…x/kernel/git/gregkh/driver-core

Pull driver core fix from Greg KH:
 "Here is one fix for the hotplug memory path that resolves a regression
  when removing memory that showed up in 3.12-rc1"

* tag 'driver-core-3.12-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
  driver core: Release device_hotplug_lock when store_mem_state returns EINVAL
  • Loading branch information
Linus Torvalds committed Oct 17, 2013
2 parents 02a3250 + a37f863 commit 83f11a9
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions drivers/base/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -333,8 +333,10 @@ store_mem_state(struct device *dev,
online_type = ONLINE_KEEP;
else if (!strncmp(buf, "offline", min_t(int, count, 7)))
online_type = -1;
else
return -EINVAL;
else {
ret = -EINVAL;
goto err;
}

switch (online_type) {
case ONLINE_KERNEL:
Expand All @@ -357,6 +359,7 @@ store_mem_state(struct device *dev,
ret = -EINVAL; /* should never happen */
}

err:
unlock_device_hotplug();

if (ret)
Expand Down

0 comments on commit 83f11a9

Please sign in to comment.