ACPI: NFIT: Import GUID before use
Strictly speaking the comparison between guid_t and raw buffer is not correct. Import GUID to variable of guid_t type and then compare. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20211213204632.56735-1-andriy.shevchenko@linux.intel.com Signed-off-by: Dan Williams <dan.j.williams@intel.com>
This commit is contained in:
Родитель
7ac5360cd4
Коммит
abc14eb1e0
|
@ -678,10 +678,12 @@ static const char *spa_type_name(u16 type)
|
|||
|
||||
int nfit_spa_type(struct acpi_nfit_system_address *spa)
|
||||
{
|
||||
guid_t guid;
|
||||
int i;
|
||||
|
||||
import_guid(&guid, spa->range_guid);
|
||||
for (i = 0; i < NFIT_UUID_MAX; i++)
|
||||
if (guid_equal(to_nfit_uuid(i), (guid_t *)&spa->range_guid))
|
||||
if (guid_equal(to_nfit_uuid(i), &guid))
|
||||
return i;
|
||||
return -1;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче