ACPI / CPPC: Prevent cpc_desc_ptr points to the invalid data
authorHoan Tran <hotran@apm.com>
Wed, 25 May 2016 19:09:23 +0000 (12:09 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 7 Sep 2016 06:32:38 +0000 (08:32 +0200)
commit5f009361d67ddf6d8a26e5605f083e795d49c0f4
tree6353b9a62643ccbdb3887e8b2aec425cdba5da69
parentcd84d3158f21dca9dde35f6cfb51f31dc2f4bde9
ACPI / CPPC: Prevent cpc_desc_ptr points to the invalid data

commit 2324d15447a9db168b1f85e3feac635b1ff8edb8 upstream.

When CPPC fails to request a PCC channel, the CPC data is freed
and cpc_desc_ptr points to the invalid data.

Avoid this issue by moving the cpc_desc_ptr assignment after the PCC
channel request.

Signed-off-by: Hoan Tran <hotran@apm.com>
Acked-by: Ashwin Chaugule <ashwin.chaugule@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/acpi/cppc_acpi.c