Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 53af9cfb authored by Len Brown's avatar Len Brown Committed by Len Brown
Browse files

ACPI: get_throttling_state() cannot be larger than state_count

parent 2a9ef8e1
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -783,12 +783,10 @@ static int acpi_get_throttling_state(struct acpi_processor *pr,
		    (struct acpi_processor_tx_tss *)&(pr->throttling.
						      states_tss[i]);
		if (tx->control == value)
			break;
	}
	if (i > pr->throttling.state_count)
		i = -1;
			return i;
	}
	return -1;
}

static int acpi_get_throttling_value(struct acpi_processor *pr,
			int state, acpi_integer *value)