aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/processor_throttling.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/processor_throttling.c')
-rw-r--r--drivers/acpi/processor_throttling.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/acpi/processor_throttling.c b/drivers/acpi/processor_throttling.c
index d27838171f4a..d0d1f4d50434 100644
--- a/drivers/acpi/processor_throttling.c
+++ b/drivers/acpi/processor_throttling.c
@@ -783,11 +783,9 @@ static int acpi_get_throttling_state(struct acpi_processor *pr,
783 (struct acpi_processor_tx_tss *)&(pr->throttling. 783 (struct acpi_processor_tx_tss *)&(pr->throttling.
784 states_tss[i]); 784 states_tss[i]);
785 if (tx->control == value) 785 if (tx->control == value)
786 break; 786 return i;
787 } 787 }
788 if (i > pr->throttling.state_count) 788 return -1;
789 i = -1;
790 return i;
791} 789}
792 790
793static int acpi_get_throttling_value(struct acpi_processor *pr, 791static int acpi_get_throttling_value(struct acpi_processor *pr,
@@ -1291,7 +1289,7 @@ static ssize_t acpi_processor_write_throttling(struct file *file,
1291 return count; 1289 return count;
1292} 1290}
1293 1291
1294struct file_operations acpi_processor_throttling_fops = { 1292const struct file_operations acpi_processor_throttling_fops = {
1295 .owner = THIS_MODULE, 1293 .owner = THIS_MODULE,
1296 .open = acpi_processor_throttling_open_fs, 1294 .open = acpi_processor_throttling_open_fs,
1297 .read = seq_read, 1295 .read = seq_read,