summaryrefslogtreecommitdiff
path: root/src/soc/amd/picasso
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2019-08-05 15:13:53 +0300
committerKyösti Mälkki <kyosti.malkki@gmail.com>2019-08-08 04:56:03 +0000
commitd157b3e1e0aa652bb067165659fb01badacb5020 (patch)
tree24912b3b6e26e941dfb05413481cb77bdce186ab /src/soc/amd/picasso
parent14222d86785d89415c014dab294205fd186b7084 (diff)
downloadcoreboot-d157b3e1e0aa652bb067165659fb01badacb5020.tar.xz
arch/x86: Handle smm_subregion() failure
The callers don't necessarily check return value of function. Make sure the parameters are not left uninitialised in that case. Change-Id: Ic02db2d35b2ec88506320e7df609940de4aef005 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/34708 Reviewed-by: Furquan Shaikh <furquan@google.com> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/amd/picasso')
-rw-r--r--src/soc/amd/picasso/ramtop.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/soc/amd/picasso/ramtop.c b/src/soc/amd/picasso/ramtop.c
index 344b7f7cc5..6b28ec7dd6 100644
--- a/src/soc/amd/picasso/ramtop.c
+++ b/src/soc/amd/picasso/ramtop.c
@@ -130,6 +130,8 @@ int smm_subregion(int sub, uintptr_t *start, size_t *size)
clear_tvalid();
break;
default:
+ *start = 0;
+ *size = 0;
return -1;
}