aboutsummaryrefslogtreecommitdiff
path: root/source/components/resources/rsaddr.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/components/resources/rsaddr.c')
-rw-r--r--source/components/resources/rsaddr.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/source/components/resources/rsaddr.c b/source/components/resources/rsaddr.c
index 2289f2ddb6fd..8c3eb456f687 100644
--- a/source/components/resources/rsaddr.c
+++ b/source/components/resources/rsaddr.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
@@ -431,18 +431,13 @@ AcpiRsGetAddressCommon (
ACPI_RESOURCE *Resource,
AML_RESOURCE *Aml)
{
-
- /* Avoid undefined behavior: member access within misaligned address */
-
- AML_RESOURCE_ADDRESS Address;
- memcpy(&Address, Aml, sizeof(Address));
ACPI_FUNCTION_ENTRY();
/* Validate the Resource Type */
- if ((Address.ResourceType > 2) &&
- (Address.ResourceType < 0xC0) &&
- (Address.ResourceType != 0x0A))
+ if ((Aml->Address.ResourceType > 2) &&
+ (Aml->Address.ResourceType < 0xC0) &&
+ (Aml->Address.ResourceType != 0x0A))
{
return (FALSE);
}
@@ -469,7 +464,7 @@ AcpiRsGetAddressCommon (
/* Generic resource type, just grab the TypeSpecific byte */
Resource->Data.Address.Info.TypeSpecific =
- Address.SpecificFlags;
+ Aml->Address.SpecificFlags;
}
return (TRUE);
@@ -497,7 +492,6 @@ AcpiRsSetAddressCommon (
{
ACPI_FUNCTION_ENTRY ();
-
/* Set the Resource Type and General Flags */
(void) AcpiRsConvertResourceToAml (