aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/processor_perflib.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/processor_perflib.c')
-rw-r--r--drivers/acpi/processor_perflib.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/acpi/processor_perflib.c b/drivers/acpi/processor_perflib.c
index 7c6f97e9c727..44a7b168e0ec 100644
--- a/drivers/acpi/processor_perflib.c
+++ b/drivers/acpi/processor_perflib.c
@@ -578,6 +578,8 @@ acpi_processor_register_performance(struct acpi_processor_performance
578 return_VALUE(-EBUSY); 578 return_VALUE(-EBUSY);
579 } 579 }
580 580
581 WARN_ON(!performance);
582
581 pr->performance = performance; 583 pr->performance = performance;
582 584
583 if (acpi_processor_get_performance_info(pr)) { 585 if (acpi_processor_get_performance_info(pr)) {
@@ -610,7 +612,8 @@ acpi_processor_unregister_performance(struct acpi_processor_performance
610 return_VOID; 612 return_VOID;
611 } 613 }
612 614
613 kfree(pr->performance->states); 615 if (pr->performance)
616 kfree(pr->performance->states);
614 pr->performance = NULL; 617 pr->performance = NULL;
615 618
616 acpi_cpufreq_remove_file(pr); 619 acpi_cpufreq_remove_file(pr);