Skip to content

Commit

Permalink
asus-laptop: fix incorrect return value for write_acpi_int_ret if han…
Browse files Browse the repository at this point in the history
…dle 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 <axel.lin@gmail.com>
Cc: Matthew Garrett <mjg@redhat.com>
Cc: Corentin Chary <corentincj@iksaif.net>
Cc: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
  • Loading branch information
Axel Lin authored and Matthew Garrett committed Aug 3, 2010
1 parent e38f052 commit 9fb866f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/platform/x86/asus-laptop.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 9fb866f

Please sign in to comment.