From d157b3e1e0aa652bb067165659fb01badacb5020 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ky=C3=B6sti=20M=C3=A4lkki?= Date: Mon, 5 Aug 2019 15:13:53 +0300 Subject: arch/x86: Handle smm_subregion() failure MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/34708 Reviewed-by: Furquan Shaikh Reviewed-by: Arthur Heymans Tested-by: build bot (Jenkins) --- src/soc/intel/braswell/memmap.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/soc/intel/braswell') diff --git a/src/soc/intel/braswell/memmap.c b/src/soc/intel/braswell/memmap.c index 01594eabb0..51b7b36db4 100644 --- a/src/soc/intel/braswell/memmap.c +++ b/src/soc/intel/braswell/memmap.c @@ -62,6 +62,8 @@ int smm_subregion(int sub, uintptr_t *start, size_t *size) sub_size = cache_size; break; default: + *start = 0; + *size = 0; return -1; } -- cgit v1.2.3