aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAxel Lin <[email protected]>2010-07-20 15:19:47 -0700
committerMatthew Garrett <[email protected]>2010-08-03 09:49:01 -0400
commit9fb866f317def195bb794120e13d1d73c2a94bb2 (patch)
treebc6f8fef9ddcb76db8e3db97f108c6dc5aa5d743
parente38f052ba5fd4d3d8eb547e7d0c6bc1143a2babd (diff)
asus-laptop: fix incorrect return value for write_acpi_int_ret if handle is NULL
According to the comments of write_acpi_int_ret(), write_acpi_int_ret() should return 0 if write is successful, -1 else. Thus if handle is NULL, the write does not happen, it should return -1. Signed-off-by: Axel Lin <[email protected]> Cc: Matthew Garrett <[email protected]> Cc: Corentin Chary <[email protected]> Cc: Alan Jenkins <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Matthew Garrett <[email protected]>
-rw-r--r--drivers/platform/x86/asus-laptop.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/platform/x86/asus-laptop.c b/drivers/platform/x86/asus-laptop.c
index 4af5709f8317..19445eaff6ff 100644
--- a/drivers/platform/x86/asus-laptop.c
+++ b/drivers/platform/x86/asus-laptop.c
@@ -297,7 +297,7 @@ static int write_acpi_int_ret(acpi_handle handle, const char *method, int val,
acpi_status status;
if (!handle)
- return 0;
+ return -1;
params.count = 1;
params.pointer = &in_obj;