[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1481913346-16321-1-git-send-email-boris.ostrovsky@oracle.com>
Date: Fri, 16 Dec 2016 13:35:46 -0500
From: Boris Ostrovsky <boris.ostrovsky@...cle.com>
To: rjw@...ysocki.net, lenb@...nel.org
Cc: linux-acpi@...r.kernel.org, linux-kernel@...r.kernel.org,
Boris Ostrovsky <boris.ostrovsky@...cle.com>
Subject: [PATCH] ACPI/CPC: Don't try to clean up uninitialized CPC data
If acpi_cppc_processor_probe() had not executed successfully (for
example, if _CPC object was not found) then cpc_desc_ptr for that
processor will be invalid.
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@...cle.com>
---
drivers/acpi/cppc_acpi.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/acpi/cppc_acpi.c b/drivers/acpi/cppc_acpi.c
index d0d0504..5bba26e 100644
--- a/drivers/acpi/cppc_acpi.c
+++ b/drivers/acpi/cppc_acpi.c
@@ -824,6 +824,8 @@ void acpi_cppc_processor_exit(struct acpi_processor *pr)
void __iomem *addr;
cpc_ptr = per_cpu(cpc_desc_ptr, pr->id);
+ if (!cpc_ptr)
+ return;
/* Free all the mapped sys mem areas for this CPU */
for (i = 2; i < cpc_ptr->num_entries; i++) {
--
1.8.3.1
Powered by blists - more mailing lists