diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-10-17 13:39:01 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-10-17 13:39:01 -0400 |
commit | 83f11a9cf2578b104c0daf18fc9c7d33c3d6d53a (patch) | |
tree | 4b884381e2686db8e0b33a6b17cdbc5af7c0a12c | |
parent | 02a3250fd39e3ad7568acc296e8d4d2d265c3def (diff) | |
parent | a37f86305c80f441b8b99dae7c19d3f9d2effc15 (diff) |
Merge tag 'driver-core-3.12-rc6' of git://git.kernel.org/pub/scm/linux/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
-rw-r--r-- | drivers/base/memory.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/base/memory.c b/drivers/base/memory.c index 9e59f6535c44..bece691cb5d9 100644 --- a/drivers/base/memory.c +++ b/drivers/base/memory.c | |||
@@ -333,8 +333,10 @@ store_mem_state(struct device *dev, | |||
333 | online_type = ONLINE_KEEP; | 333 | online_type = ONLINE_KEEP; |
334 | else if (!strncmp(buf, "offline", min_t(int, count, 7))) | 334 | else if (!strncmp(buf, "offline", min_t(int, count, 7))) |
335 | online_type = -1; | 335 | online_type = -1; |
336 | else | 336 | else { |
337 | return -EINVAL; | 337 | ret = -EINVAL; |
338 | goto err; | ||
339 | } | ||
338 | 340 | ||
339 | switch (online_type) { | 341 | switch (online_type) { |
340 | case ONLINE_KERNEL: | 342 | case ONLINE_KERNEL: |
@@ -357,6 +359,7 @@ store_mem_state(struct device *dev, | |||
357 | ret = -EINVAL; /* should never happen */ | 359 | ret = -EINVAL; /* should never happen */ |
358 | } | 360 | } |
359 | 361 | ||
362 | err: | ||
360 | unlock_device_hotplug(); | 363 | unlock_device_hotplug(); |
361 | 364 | ||
362 | if (ret) | 365 | if (ret) |