From 81ee51d010516fcc78ca04de3dcc8c8e2f425c2e Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Sat, 10 Jun 2006 09:54:13 -0700 Subject: [PATCH] --- yaml --- r: 27173 b: refs/heads/master c: a913f50706b21c7933f53cec678bb9a1c2383499 h: refs/heads/master i: 27171: 9915c7af3e9de3b707bd0dea835ec46f6f470716 v: v3 --- [refs] | 2 +- trunk/drivers/acpi/processor_perflib.c | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index af04ef8b364f..98188e254b25 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 670bd95e0413c43f878b73a4a3919d1f452a4157 +refs/heads/master: a913f50706b21c7933f53cec678bb9a1c2383499 diff --git a/trunk/drivers/acpi/processor_perflib.c b/trunk/drivers/acpi/processor_perflib.c index abbdb37a7f5f..f36db22ce1ae 100644 --- a/trunk/drivers/acpi/processor_perflib.c +++ b/trunk/drivers/acpi/processor_perflib.c @@ -577,6 +577,8 @@ acpi_processor_register_performance(struct acpi_processor_performance return_VALUE(-EBUSY); } + WARN_ON(!performance); + pr->performance = performance; if (acpi_processor_get_performance_info(pr)) { @@ -609,7 +611,8 @@ acpi_processor_unregister_performance(struct acpi_processor_performance return_VOID; } - kfree(pr->performance->states); + if (pr->performance) + kfree(pr->performance->states); pr->performance = NULL; acpi_cpufreq_remove_file(pr);