forked from luck/tmp_suning_uos_patched
Driver core fix for 3.12-rc6
Here is one fix for the hotplug memory path that resolves a regression when removing memory that showed up in 3.12-rc1. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iEYEABECAAYFAlJgHqMACgkQMUfUDdst+ykplQCgym3aZCnwCAASgrM5g0fyM5LW eR4AmQGqYBZBticsmGqLWDyUksrnL/6S =zRIr -----END PGP SIGNATURE----- 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
This commit is contained in:
commit
83f11a9cf2
|
@ -333,8 +333,10 @@ store_mem_state(struct device *dev,
|
||||||
online_type = ONLINE_KEEP;
|
online_type = ONLINE_KEEP;
|
||||||
else if (!strncmp(buf, "offline", min_t(int, count, 7)))
|
else if (!strncmp(buf, "offline", min_t(int, count, 7)))
|
||||||
online_type = -1;
|
online_type = -1;
|
||||||
else
|
else {
|
||||||
return -EINVAL;
|
ret = -EINVAL;
|
||||||
|
goto err;
|
||||||
|
}
|
||||||
|
|
||||||
switch (online_type) {
|
switch (online_type) {
|
||||||
case ONLINE_KERNEL:
|
case ONLINE_KERNEL:
|
||||||
|
@ -357,6 +359,7 @@ store_mem_state(struct device *dev,
|
||||||
ret = -EINVAL; /* should never happen */
|
ret = -EINVAL; /* should never happen */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
err:
|
||||||
unlock_device_hotplug();
|
unlock_device_hotplug();
|
||||||
|
|
||||||
if (ret)
|
if (ret)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user