[coreboot-gerrit] Change in coreboot[master]: soc/amd/common/block/s3/s3_resume.c: Check mrc_cache_get_current() re...
Richard Spiegel (Code Review)
gerrit at coreboot.org
Wed Feb 14 18:19:08 CET 2018
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 at 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)
--
To view, visit https://review.coreboot.org/23761
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I0f6a58380a38d13120e997dcd966423d3c2af091
Gerrit-Change-Number: 23761
Gerrit-PatchSet: 1
Gerrit-Owner: Richard Spiegel <richard.spiegel at silverbackltd.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180214/0262730b/attachment.html>
More information about the coreboot-gerrit
mailing list