summaryrefslogtreecommitdiffstats
path: root/drivers/acpi
diff options
context:
space:
mode:
authorAshwin Chaugule <ashwin.chaugule@linaro.org>2015-10-23 11:02:52 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-10-26 04:47:02 +0100
commit4219853aef645d29b122daa8a8b7bd792f1cc7c9 (patch)
treef56759c7aeb08dc84a2681bbf6f83ecf6e6faf46 /drivers/acpi
parentACPI / CPPC: signedness bug in register_pcc_channel() (diff)
downloadlinux-4219853aef645d29b122daa8a8b7bd792f1cc7c9.tar.xz
linux-4219853aef645d29b122daa8a8b7bd792f1cc7c9.zip
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')
-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: