diff options
author | ydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-06-21 02:24:46 +0000 |
---|---|---|
committer | ydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-06-21 02:24:46 +0000 |
commit | 18ad26da318b11bd6be78ea751bc07bfa6f441eb (patch) | |
tree | ab0f83d682b2c4698dd307f81df52f6a2cd4c18d /MdePkg/Library/DxeSalLibEsal/DxeSalLibEsal.c | |
parent | ea203f22151c12091013ecc44794b743b2a7728a (diff) | |
download | edk2-platforms-18ad26da318b11bd6be78ea751bc07bfa6f441eb.tar.xz |
Initialize data before using it
Signed-off-by: ydong10
Reviewed-by: lgao4
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11869 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg/Library/DxeSalLibEsal/DxeSalLibEsal.c')
-rw-r--r-- | MdePkg/Library/DxeSalLibEsal/DxeSalLibEsal.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/MdePkg/Library/DxeSalLibEsal/DxeSalLibEsal.c b/MdePkg/Library/DxeSalLibEsal/DxeSalLibEsal.c index b013146eb2..8d1dd9ae15 100644 --- a/MdePkg/Library/DxeSalLibEsal/DxeSalLibEsal.c +++ b/MdePkg/Library/DxeSalLibEsal/DxeSalLibEsal.c @@ -59,6 +59,14 @@ SalCall ( )
{
SAL_RETURN_REGS Regs;
+
+ //
+ // Initial all members in this structure.
+ //
+ Regs.r9 = 0;
+ Regs.r10 = 0;
+ Regs.r11 = 0;
+ Regs.Status = EFI_SAL_INVALID_ARGUMENT;
switch (Index) {
case EFI_SAL_SET_VECTORS:
@@ -272,7 +280,6 @@ SalCall ( break;
default:
- Regs.Status = EFI_SAL_INVALID_ARGUMENT;
return Regs;
break;
}
|