Commit 3b1c37ca authored by Jonathan Woithe's avatar Jonathan Woithe Committed by Len Brown

fujitu-laptop: fix tests of acpi_evaluate_integer() return value

Fix tests on return value from acpi_evaluate_integer().  Based on a patch by
Roel Kluin <roel.kluin@gmail.com> and incorporating suggestions from Len
Brown <lenb@kernel.org>.
Signed-off-by: default avatarRoel Kluin <roel.kluin@gmail.com>
Signed-off-by: default avatarJonathan Woithe <jwoithe@physics.adelaide.edu.au>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent 4a28395d
...@@ -376,8 +376,8 @@ static int get_lcd_level(void) ...@@ -376,8 +376,8 @@ static int get_lcd_level(void)
status = status =
acpi_evaluate_integer(fujitsu->acpi_handle, "GBLL", NULL, &state); acpi_evaluate_integer(fujitsu->acpi_handle, "GBLL", NULL, &state);
if (status < 0) if (ACPI_FAILURE(status))
return status; return 0;
fujitsu->brightness_level = state & 0x0fffffff; fujitsu->brightness_level = state & 0x0fffffff;
...@@ -398,8 +398,8 @@ static int get_max_brightness(void) ...@@ -398,8 +398,8 @@ static int get_max_brightness(void)
status = status =
acpi_evaluate_integer(fujitsu->acpi_handle, "RBLL", NULL, &state); acpi_evaluate_integer(fujitsu->acpi_handle, "RBLL", NULL, &state);
if (status < 0) if (ACPI_FAILURE(status))
return status; return -1;
fujitsu->max_brightness = state; fujitsu->max_brightness = state;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment