Remove tautological compare.

PR:		kern/176712
Submitted by:	Hiren Panchasara <hiren.panchasara@gmail.com>
Approved by:	cperciva (mentor)
This commit is contained in:
Eitan Adler 2013-04-23 13:02:48 +00:00
parent 455a367f95
commit 512515147b

View File

@ -324,7 +324,7 @@ hci_force_fan(ACPI_HANDLE h, int op, UINT32 *state)
ACPI_SERIAL_ASSERT(toshiba);
if (op == HCI_SET) {
if (*state < 0 || *state > 1)
if (*state > 1)
return (EINVAL);
*state <<= HCI_FAN_SHIFT;
}
@ -368,7 +368,7 @@ hci_lcd_brightness(ACPI_HANDLE h, int op, UINT32 *brightness)
ACPI_SERIAL_ASSERT(toshiba);
if (op == HCI_SET) {
if (*brightness < 0 || *brightness > HCI_LCD_BRIGHTNESS_MAX)
if (*brightness > HCI_LCD_BRIGHTNESS_MAX)
return (EINVAL);
*brightness <<= HCI_LCD_BRIGHTNESS_SHIFT;
}
@ -384,7 +384,7 @@ hci_lcd_backlight(ACPI_HANDLE h, int op, UINT32 *backlight)
ACPI_SERIAL_ASSERT(toshiba);
if (op == HCI_SET) {
if (*backlight < 0 || *backlight > 1)
if (*backlight > 1)
return (EINVAL);
}
return (hci_call(h, op, HCI_REG_LCD_BACKLIGHT, backlight));
@ -397,7 +397,7 @@ hci_cpu_speed(ACPI_HANDLE h, int op, UINT32 *speed)
ACPI_SERIAL_ASSERT(toshiba);
if (op == HCI_SET) {
if (*speed < 0 || *speed > HCI_CPU_SPEED_MAX)
if (*speed > HCI_CPU_SPEED_MAX)
return (EINVAL);
*speed <<= HCI_CPU_SPEED_SHIFT;
}