From: Axel Lin <[email protected]>

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]>
---

 drivers/platform/x86/asus-laptop.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -puN 
drivers/platform/x86/asus-laptop.c~asus-laptop-fix-incorrect-return-value-for-write_acpi_int_ret-if-handle-is-null
 drivers/platform/x86/asus-laptop.c
--- 
a/drivers/platform/x86/asus-laptop.c~asus-laptop-fix-incorrect-return-value-for-write_acpi_int_ret-if-handle-is-null
+++ a/drivers/platform/x86/asus-laptop.c
@@ -297,7 +297,7 @@ static int write_acpi_int_ret(acpi_handl
        acpi_status status;
 
        if (!handle)
-               return 0;
+               return -1;
 
        params.count = 1;
        params.pointer = &in_obj;
_
--
To unsubscribe from this list: send the line "unsubscribe platform-driver-x86" 
in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to