mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-02 03:46:37 +07:00
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 <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>
This commit is contained in:
parent
e38f052ba5
commit
9fb866f317
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user