summaryrefslogtreecommitdiff
path: root/drivers/acpi/cppc_acpi.c
diff options
context:
space:
mode:
authorAshwin Chaugule <ashwin.chaugule@linaro.org>2015-10-23 12:02:52 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-10-26 06:47:02 +0300
commit4219853aef645d29b122daa8a8b7bd792f1cc7c9 (patch)
treef56759c7aeb08dc84a2681bbf6f83ecf6e6faf46 /drivers/acpi/cppc_acpi.c
parent32c0b2f606a4b71fc7b7cfa479cf47648854d9d9 (diff)
downloadlinux-4219853aef645d29b122daa8a8b7bd792f1cc7c9.tar.xz
ACPI / CPPC: Fix potential memory leak
Commit 337aadff8e45 (ACPI: Introduce CPU performance controls using CPPC) leads to the following static checker warning: drivers/acpi/cppc_acpi.c:527 acpi_cppc_processor_probe() warn: overwrite may leak 'cpc_ptr' Fix the warning by removing the bogus per-CPU pointer dereference. Fixes: 337aadff8e45 (ACPI: Introduce CPU performance controls using CPPC) Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Ashwin Chaugule <ashwin.chaugule@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/cppc_acpi.c')
-rw-r--r--drivers/acpi/cppc_acpi.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/acpi/cppc_acpi.c b/drivers/acpi/cppc_acpi.c
index 2ed55161bca5..3c083d2cc434 100644
--- a/drivers/acpi/cppc_acpi.c
+++ b/drivers/acpi/cppc_acpi.c
@@ -524,7 +524,6 @@ int acpi_cppc_processor_probe(struct acpi_processor *pr)
return 0;
out_free:
- cpc_ptr = per_cpu(cpc_desc_ptr, pr->id);
kfree(cpc_ptr);
out_buf_free: