Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 84163
b: refs/heads/master
c: 8765427
h: refs/heads/master
i:
  84161: e746c15
  84159: 7870bff
v: v3
  • Loading branch information
Zhao Yakui authored and Len Brown committed Feb 2, 2008
1 parent cd8a03c commit bc3b1b3
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3abbd337c60591305cbfeb984ff2922c175be37f
refs/heads/master: 87654273ef63213f90c4243913987436495824f0
15 changes: 15 additions & 0 deletions trunk/drivers/acpi/processor_throttling.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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.
*/
Expand Down

0 comments on commit bc3b1b3

Please sign in to comment.