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
Unified · Split
| @@ -1658,13 +1658,13 @@ static ssize_t write_cpuhp_target(struct device *dev, · 1657 unmodified lines | ||
| 1658 | 1658 | ret = !sp->name || sp->cant_stop ? -EINVAL : 0; |
| 1659 | 1659 | mutex_unlock(&cpuhp_state_mutex); |
| 1660 | 1660 | if (ret) |
| 1661 | − return ret; | |
| 1661 | + goto out; | |
| 1662 | 1662 | |
| 1663 | 1663 | if (st->state < target) |
| 1664 | 1664 | ret = do_cpu_up(dev->id, target); |
| 1665 | 1665 | else |
| 1666 | 1666 | ret = do_cpu_down(dev->id, target); |
| 1667 | − | |
| 1667 | +out: | |
| 1668 | 1668 | unlock_device_hotplug(); |
| 1669 | 1669 | return ret ? ret : count; |
| 1670 | 1670 | } |