summaryrefslogtreecommitdiffstats
path: root/kernel/drivers/xen/xen-acpi-processor.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/drivers/xen/xen-acpi-processor.c')
-rw-r--r--kernel/drivers/xen/xen-acpi-processor.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/kernel/drivers/xen/xen-acpi-processor.c b/kernel/drivers/xen/xen-acpi-processor.c
index 59fc190f1..70fa43800 100644
--- a/kernel/drivers/xen/xen-acpi-processor.c
+++ b/kernel/drivers/xen/xen-acpi-processor.c
@@ -560,11 +560,9 @@ static int __init xen_acpi_processor_init(void)
return 0;
err_unregister:
- for_each_possible_cpu(i) {
- struct acpi_processor_performance *perf;
- perf = per_cpu_ptr(acpi_perf_data, i);
- acpi_processor_unregister_performance(perf, i);
- }
+ for_each_possible_cpu(i)
+ acpi_processor_unregister_performance(i);
+
err_out:
/* Freeing a NULL pointer is OK: alloc_percpu zeroes. */
free_acpi_perf_data();
@@ -579,11 +577,9 @@ static void __exit xen_acpi_processor_exit(void)
kfree(acpi_ids_done);
kfree(acpi_id_present);
kfree(acpi_id_cst_present);
- for_each_possible_cpu(i) {
- struct acpi_processor_performance *perf;
- perf = per_cpu_ptr(acpi_perf_data, i);
- acpi_processor_unregister_performance(perf, i);
- }
+ for_each_possible_cpu(i)
+ acpi_processor_unregister_performance(i);
+
free_acpi_perf_data();
}