aboutsummaryrefslogtreecommitdiff
path: root/source/components/resources/rslist.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/components/resources/rslist.c')
-rw-r--r--source/components/resources/rslist.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/source/components/resources/rslist.c b/source/components/resources/rslist.c
index 82f3de7e4227..779f9626ea54 100644
--- a/source/components/resources/rslist.c
+++ b/source/components/resources/rslist.c
@@ -8,7 +8,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2024, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -209,12 +209,7 @@ AcpiRsConvertAmlToResources (
if (AcpiUtGetResourceType (Aml) ==
ACPI_RESOURCE_NAME_SERIAL_BUS)
{
- /* Avoid undefined behavior: member access within misaligned address */
-
- AML_RESOURCE_COMMON_SERIALBUS CommonSerialBus;
- memcpy(&CommonSerialBus, AmlResource, sizeof(CommonSerialBus));
-
- if (CommonSerialBus.Type >
+ if (AmlResource->CommonSerialBus.Type >
AML_RESOURCE_MAX_SERIALBUSTYPE)
{
ConversionTable = NULL;
@@ -224,7 +219,7 @@ AcpiRsConvertAmlToResources (
/* This is an I2C, SPI, UART, or CSI2 SerialBus descriptor */
ConversionTable = AcpiGbl_ConvertResourceSerialBusDispatch [
- CommonSerialBus.Type];
+ AmlResource->CommonSerialBus.Type];
}
}
else