summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/ramstage_cache.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/ramstage_cache.c b/src/lib/ramstage_cache.c
index a1a4804a16..0f7273a961 100644
--- a/src/lib/ramstage_cache.c
+++ b/src/lib/ramstage_cache.c
@@ -79,7 +79,7 @@ void *load_cached_ramstage(struct romstage_handoff *handoff,
cache = ramstage_cache_location(&size);
- if (cache == NULL || cache->magic != RAMSTAGE_CACHE_MAGIC) {
+ if (!ramstage_cache_is_valid(cache)) {
printk(BIOS_DEBUG, "Invalid ramstage cache found.\n");
ramstage_cache_invalid(cache);
return NULL;