summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoreadler <eadler@FreeBSD.org>2013-04-23 13:02:48 +0000
committereadler <eadler@FreeBSD.org>2013-04-23 13:02:48 +0000
commitea8f9acbe07fef36d4a117e620b2e9903dc3cef9 (patch)
tree1ef634601c32d144996ce0da256e7641c15fffbf
parent75e877a897c7db8438b705430aeaa0570f365289 (diff)
downloadFreeBSD-src-ea8f9acbe07fef36d4a117e620b2e9903dc3cef9.zip
FreeBSD-src-ea8f9acbe07fef36d4a117e620b2e9903dc3cef9.tar.gz
Remove tautological compare.
PR: kern/176712 Submitted by: Hiren Panchasara <hiren.panchasara@gmail.com> Approved by: cperciva (mentor)
-rw-r--r--sys/dev/acpi_support/acpi_toshiba.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/acpi_support/acpi_toshiba.c b/sys/dev/acpi_support/acpi_toshiba.c
index 9e3dc5b..8ceb76b 100644
--- a/sys/dev/acpi_support/acpi_toshiba.c
+++ b/sys/dev/acpi_support/acpi_toshiba.c
@@ -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;
}
OpenPOWER on IntegriCloud