summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-06-10 10:49:42 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2017-06-10 10:49:42 -0700
commit45b44f0f287d6d396b78466e13be1d1ea3d3097b (patch)
treefee7759219eb23b30df46f5fa249209e64cbd681
parent6b7ed4588ce681222534f901ce825d1ead31882a (diff)
parent40da1b11f01e43aad1aa6cea64681b6125e8a2a7 (diff)
downloadlinux-45b44f0f287d6d396b78466e13be1d1ea3d3097b.tar.bz2
Merge branch 'smp-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull CPU hotplug fix from Ingo Molnar: "An error handling corner case fix" * 'smp-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: cpu/hotplug: Drop the device lock on error
-rw-r--r--kernel/cpu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/cpu.c b/kernel/cpu.c
index 9ae6fbe5b5cf..cb5103413bd8 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -1658,13 +1658,13 @@ static ssize_t write_cpuhp_target(struct device *dev,
ret = !sp->name || sp->cant_stop ? -EINVAL : 0;
mutex_unlock(&cpuhp_state_mutex);
if (ret)
- return ret;
+ goto out;
if (st->state < target)
ret = do_cpu_up(dev->id, target);
else
ret = do_cpu_down(dev->id, target);
-
+out:
unlock_device_hotplug();
return ret ? ret : count;
}