projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
acpi, nfit: fix acpi_check_dsm() vs zero functions implemented
[cascardo/linux.git]
/
drivers
/
acpi
/
utils.c
diff --git
a/drivers/acpi/utils.c
b/drivers/acpi/utils.c
index
22c0995
..
b4de130
100644
(file)
--- a/
drivers/acpi/utils.c
+++ b/
drivers/acpi/utils.c
@@
-680,9
+680,6
@@
bool acpi_check_dsm(acpi_handle handle, const u8 *uuid, u64 rev, u64 funcs)
u64 mask = 0;
union acpi_object *obj;
u64 mask = 0;
union acpi_object *obj;
- if (funcs == 0)
- return false;
-
obj = acpi_evaluate_dsm(handle, uuid, rev, 0, NULL);
if (!obj)
return false;
obj = acpi_evaluate_dsm(handle, uuid, rev, 0, NULL);
if (!obj)
return false;
@@
-695,6
+692,9
@@
bool acpi_check_dsm(acpi_handle handle, const u8 *uuid, u64 rev, u64 funcs)
mask |= (((u64)obj->buffer.pointer[i]) << (i * 8));
ACPI_FREE(obj);
mask |= (((u64)obj->buffer.pointer[i]) << (i * 8));
ACPI_FREE(obj);
+ if (funcs == 0)
+ return true;
+
/*
* Bit 0 indicates whether there's support for any functions other than
* function 0 for the specified UUID and revision.
/*
* Bit 0 indicates whether there's support for any functions other than
* function 0 for the specified UUID and revision.