Richard Spiegel has uploaded this change for review. ( https://review.coreboot.org/23761
Change subject: soc/amd/common/block/s3/s3_resume.c: Check mrc_cache_get_current() return ......................................................................
soc/amd/common/block/s3/s3_resume.c: Check mrc_cache_get_current() return
Procedure mrc_cache_get_current() returns -1 for error, 0 for pass. Do check the return in procedure get_s3nv_info.
This fixes CID 1385943 BUG=b:73333332 TEST=Build kahlee
Change-Id: I0f6a58380a38d13120e997dcd966423d3c2af091 Signed-off-by: Richard Spiegel richard.spiegel@silverbackltd.com --- M src/soc/amd/common/block/s3/s3_resume.c 1 file changed, 5 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/61/23761/1
diff --git a/src/soc/amd/common/block/s3/s3_resume.c b/src/soc/amd/common/block/s3/s3_resume.c index 4883fa5..1ba9468 100644 --- a/src/soc/amd/common/block/s3/s3_resume.c +++ b/src/soc/amd/common/block/s3/s3_resume.c @@ -27,7 +27,11 @@ { struct region_device rdev;
- mrc_cache_get_current(MRC_TRAINING_DATA, DEFAULT_MRC_VERSION, &rdev); + if (mrc_cache_get_current(MRC_TRAINING_DATA, DEFAULT_MRC_VERSION, + &rdev)) { + printk(BIOS_ERR, "mrc_cache_get_current returned error\n"); + return; + } *base = rdev_mmap_full(&rdev); *size = region_device_sz(&rdev); if (!*base || !*size)