summaryrefslogtreecommitdiff
path: root/src/vendorcode
diff options
context:
space:
mode:
authorPaul Kocialkowski <contact@paulk.fr>2015-09-03 11:44:56 +0200
committerAaron Durbin <adurbin@chromium.org>2015-09-30 21:31:55 +0000
commit3faea59e26bc535f0b1827a2249e36abf2d08f6a (patch)
tree32d9cfd06889980909f615ca1a9b128104ab5c3f /src/vendorcode
parent46731237ceca6162302e23f535dc886ac171b6e6 (diff)
chromeos: vboot_common: Avoid code duplication when grabbing the handoff info
vboot_handoff_flag was duplicating the logic to grab the handoff info, that is already made available with vboot_get_handoff_info. This uses vboot_get_handoff_info in vboot_handoff_flag instead. Change-Id: I28f1decce98f988f90c446a3a0dbe7409d714527 Signed-off-by: Paul Kocialkowski <contact@paulk.fr> Reviewed-on: http://review.coreboot.org/11498 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src/vendorcode')
-rw-r--r--src/vendorcode/google/chromeos/vboot_common.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/vendorcode/google/chromeos/vboot_common.c b/src/vendorcode/google/chromeos/vboot_common.c
index 1c216d0d82..6184b0d5e9 100644
--- a/src/vendorcode/google/chromeos/vboot_common.c
+++ b/src/vendorcode/google/chromeos/vboot_common.c
@@ -58,10 +58,9 @@ int vboot_get_handoff_info(void **addr, uint32_t *size)
static int vboot_handoff_flag(uint32_t flag)
{
struct vboot_handoff *vbho;
+ uint32_t size;
- vbho = cbmem_find(CBMEM_ID_VBOOT_HANDOFF);
-
- if (vbho == NULL)
+ if (vboot_get_handoff_info((void **)&vbho, &size))
return 0;
return !!(vbho->init_params.out_flags & flag);