From 9fb866f317def195bb794120e13d1d73c2a94bb2 Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Tue, 20 Jul 2010 15:19:47 -0700 Subject: [PATCH] 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 Cc: Matthew Garrett Cc: Corentin Chary Cc: Alan Jenkins Signed-off-by: Andrew Morton Signed-off-by: Matthew Garrett --- drivers/platform/x86/asus-laptop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/platform/x86/asus-laptop.c b/drivers/platform/x86/asus-laptop.c index 4af5709f831..19445eaff6f 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; -- 2.20.1