diff mbox

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

Message ID 200912222249.nBMMngkl002406@turbo.physics.adelaide.edu.au (mailing list archive)
State RFC, archived
Headers show

Commit Message

Jonathan Woithe Dec. 22, 2009, 10:49 p.m. UTC
None
diff mbox

Patch

--- a/drivers/platform/x86/fujitsu-laptop.c	2009-12-23 09:11:23.599497331 +1030
+++ b/drivers/platform/x86/fujitsu-laptop.c	2009-12-23 09:12:12.754405304 +1030
@@ -376,8 +376,8 @@  static int get_lcd_level(void)
 
 	status =
 	    acpi_evaluate_integer(fujitsu->acpi_handle, "GBLL", NULL, &state);
-	if (status < 0)
-		return status;
+	if (ACPI_FAILURE(status))
+		return 0;
 
 	fujitsu->brightness_level = state & 0x0fffffff;
 
@@ -398,8 +398,8 @@  static int get_max_brightness(void)
 
 	status =
 	    acpi_evaluate_integer(fujitsu->acpi_handle, "RBLL", NULL, &state);
-	if (status < 0)
-		return status;
+	if (ACPI_FAILURE(status))
+		return -1;
 
 	fujitsu->max_brightness = state;