Skip to content

Commit 5be583c

Browse files
committed
ACPI: processor: perflib: Rearrange unregistration routine
Rearrange acpi_processor_unregister_performance() to follow a more common error handling pattern and drop a redundant "return" statement from the end of it. No expected functional impact. Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent d8f4ed0 commit 5be583c

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

drivers/acpi/processor_perflib.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -754,18 +754,15 @@ void acpi_processor_unregister_performance(unsigned int cpu)
754754
mutex_lock(&performance_mutex);
755755

756756
pr = per_cpu(processors, cpu);
757-
if (!pr) {
758-
mutex_unlock(&performance_mutex);
759-
return;
760-
}
757+
if (!pr)
758+
goto unlock;
761759

762760
if (pr->performance)
763761
kfree(pr->performance->states);
764762

765763
pr->performance = NULL;
766764

765+
unlock:
767766
mutex_unlock(&performance_mutex);
768-
769-
return;
770767
}
771768
EXPORT_SYMBOL(acpi_processor_unregister_performance);

0 commit comments

Comments
 (0)