mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
cpuidle: rearrange __cpuidle_register_device() to keep minimal exit points
This patch rearranges __cpuidle_register_device() a bit in order to reduce the number of exit points in that function. Signed-off-by: Viresh Kumar <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
This commit is contained in:
parent
b171a85648
commit
47182668ca
1 changed files with 4 additions and 5 deletions
|
|
@ -383,13 +383,12 @@ static int __cpuidle_register_device(struct cpuidle_device *dev)
|
|||
list_add(&dev->device_list, &cpuidle_detected_devices);
|
||||
|
||||
ret = cpuidle_coupled_register_device(dev);
|
||||
if (ret) {
|
||||
if (ret)
|
||||
__cpuidle_unregister_device(dev);
|
||||
return ret;
|
||||
}
|
||||
else
|
||||
dev->registered = 1;
|
||||
|
||||
dev->registered = 1;
|
||||
return 0;
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue