diff options
author | Ashwin Chaugule <ashwin.chaugule@linaro.org> | 2015-10-23 05:02:52 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2015-10-26 04:47:02 +0100 |
commit | 4219853aef645d29b122daa8a8b7bd792f1cc7c9 (patch) | |
tree | f56759c7aeb08dc84a2681bbf6f83ecf6e6faf46 /drivers | |
parent | 32c0b2f606a4b71fc7b7cfa479cf47648854d9d9 (diff) | |
download | linux-4219853aef645d29b122daa8a8b7bd792f1cc7c9.tar.bz2 |
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')
-rw-r--r-- | drivers/acpi/cppc_acpi.c | 1 |
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: |