diff --git a/[refs] b/[refs] index 3db0e3eae4f1..6aeb1c42420c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 3abbd337c60591305cbfeb984ff2922c175be37f +refs/heads/master: 87654273ef63213f90c4243913987436495824f0 diff --git a/trunk/drivers/acpi/processor_throttling.c b/trunk/drivers/acpi/processor_throttling.c index 1685b40abda7..5d2eae207886 100644 --- a/trunk/drivers/acpi/processor_throttling.c +++ b/trunk/drivers/acpi/processor_throttling.c @@ -589,6 +589,11 @@ static int acpi_processor_get_throttling(struct acpi_processor *pr) cpumask_t saved_mask; int ret; + if (!pr) + return -EINVAL; + + if (!pr->flags.throttling) + return -ENODEV; /* * Migrate task to the cpu pointed by pr. */ @@ -743,6 +748,16 @@ int acpi_processor_set_throttling(struct acpi_processor *pr, int state) { cpumask_t saved_mask; int ret; + + if (!pr) + return -EINVAL; + + if (!pr->flags.throttling) + return -ENODEV; + + if ((state < 0) || (state > (pr->throttling.state_count - 1))) + return -EINVAL; + /* * Migrate task to the cpu pointed by pr. */