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> Reviewed-on: https://review.coreboot.org/23761 Reviewed-by: Aaron Durbin <adurbin@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
5e83e8b130
commit
405f72952c
|
@ -27,7 +27,11 @@ void get_s3nv_info(void **base, size_t *size)
|
|||
{
|
||||
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)
|
||||
|
|
Loading…
Reference in New Issue