ACPI / CPPC: signedness bug in register_pcc_channel()
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 22 Oct 2015 19:52:59 +0000 (22:52 +0300)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 26 Oct 2015 03:44:17 +0000 (04:44 +0100)
The "pcc_subspace_idx" is -1 if it hasn't been initialized yet.  We need
it to be signed.

Fixes: 337aadff8e45 (ACPI: Introduce CPU performance controls using CPPC)
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Ashwin Chaugule <ashwin.chaugule@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/cppc_acpi.c

index 0bbf84b..2ed5516 100644 (file)
@@ -302,7 +302,7 @@ err_ret:
 }
 EXPORT_SYMBOL_GPL(acpi_get_psd_map);
 
-static int register_pcc_channel(unsigned pcc_subspace_idx)
+static int register_pcc_channel(int pcc_subspace_idx)
 {
        struct acpi_pcct_subspace *cppc_ss;
        unsigned int len;