summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorZheng Bao <fishbaozi@gmail.com>2012-10-24 11:13:47 +0800
committerMarc Jones <marcj303@gmail.com>2012-10-24 18:18:50 +0200
commit1d1a68b754e57d2dd5454c426831927dc1c3ead4 (patch)
treec6b067980cf59656eca23e436d0cd61b4fb6036b /src
parentdef50b061d58e6f8d322dcbee931ac28005716da (diff)
downloadcoreboot-1d1a68b754e57d2dd5454c426831927dc1c3ead4.tar.xz
Trinity: Initialize the pointer prior to using it
Change-Id: I2f10909a626fb64c7f95663ddd79a3b899f73bc4 Signed-off-by: Zheng Bao <zheng.bao@amd.com> Signed-off-by: Zheng Bao <fishbaozi@gmail.com> Reviewed-on: http://review.coreboot.org/1606 Tested-by: build bot (Jenkins) Reviewed-by: Dave Frodin <dave.frodin@se-eng.com> Reviewed-by: Marc Jones <marcj303@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/mainboard/amd/parmer/BiosCallOuts.c4
-rw-r--r--src/mainboard/amd/thatcher/BiosCallOuts.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/mainboard/amd/parmer/BiosCallOuts.c b/src/mainboard/amd/parmer/BiosCallOuts.c
index a5e274ae22..24268d7345 100644
--- a/src/mainboard/amd/parmer/BiosCallOuts.c
+++ b/src/mainboard/amd/parmer/BiosCallOuts.c
@@ -297,11 +297,11 @@ AGESA_STATUS BiosDeallocateBuffer (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
BIOS_HEAP_MANAGER *BiosHeapBasePtr;
AGESA_BUFFER_PARAMS *AllocParams;
+ AllocParams = (AGESA_BUFFER_PARAMS *) ConfigPtr;
+
BiosHeapBaseAddr = (UINT8 *) GetHeapBase(&(AllocParams->StdHeader));
BiosHeapBasePtr = (BIOS_HEAP_MANAGER *) BiosHeapBaseAddr;
- AllocParams = (AGESA_BUFFER_PARAMS *) ConfigPtr;
-
/* Find target node to deallocate in list of allocated nodes.
Return AGESA_BOUNDS_CHK if the BufferHandle is not found
*/
diff --git a/src/mainboard/amd/thatcher/BiosCallOuts.c b/src/mainboard/amd/thatcher/BiosCallOuts.c
index 8660e05410..d4da61aa79 100644
--- a/src/mainboard/amd/thatcher/BiosCallOuts.c
+++ b/src/mainboard/amd/thatcher/BiosCallOuts.c
@@ -297,11 +297,11 @@ AGESA_STATUS BiosDeallocateBuffer (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
BIOS_HEAP_MANAGER *BiosHeapBasePtr;
AGESA_BUFFER_PARAMS *AllocParams;
+ AllocParams = (AGESA_BUFFER_PARAMS *) ConfigPtr;
+
BiosHeapBaseAddr = (UINT8 *) GetHeapBase(&(AllocParams->StdHeader));
BiosHeapBasePtr = (BIOS_HEAP_MANAGER *) BiosHeapBaseAddr;
- AllocParams = (AGESA_BUFFER_PARAMS *) ConfigPtr;
-
/* Find target node to deallocate in list of allocated nodes.
Return AGESA_BOUNDS_CHK if the BufferHandle is not found
*/