* [PATCH] asus-laptop: fix incorrect return value for write_acpi_int_ret if handle is NULL
@ 2010-07-08 5:52 Axel Lin
0 siblings, 0 replies; only message in thread
From: Axel Lin @ 2010-07-08 5:52 UTC (permalink / raw)
To: linux-kernel
Cc: Corentin Chary, Matthew Garrett, Alan Jenkins, acpi4asus-user,
platform-driver-x86
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 <axel.lin@gmail.com>
---
drivers/platform/x86/asus-laptop.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/platform/x86/asus-laptop.c b/drivers/platform/x86/asus-laptop.c
index 71db2ef..93487eb 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;
--
1.5.4.3
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2010-07-08 5:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-08 5:52 [PATCH] asus-laptop: fix incorrect return value for write_acpi_int_ret if handle is NULL Axel Lin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox