mb/sifive/hifive-unleashed: Check for errors in fixup_fdt
commit7da638c20e4c56bc103be23216862e265b3ca8b1
authorJacob Garber <jgarber1@ualberta.ca>
Thu, 30 May 2019 22:11:41 +0000 (30 16:11 -0600)
committerPatrick Georgi <pgeorgi@google.com>
Mon, 3 Jun 2019 13:18:27 +0000 (3 13:18 +0000)
treec9e830194f86b28053f411ae43a95dd3d2f13f1a
parent38b7445ad240f7504b95e3e0c63122418e3ff159
mb/sifive/hifive-unleashed: Check for errors in fixup_fdt

It is possible that cbfs_boot_map_with_leak() and malloc() could fail,
so detect those conditions and print error messages if they do.

Change-Id: I34951da0b73028c4c89446cb1779a72422997325
Signed-off-by: Jacob Garber <jgarber1@ualberta.ca>
Found-by: Coverity CID 1399147
Reviewed-on: https://review.coreboot.org/c/coreboot/+/33134
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-by: Xiang Wang <wxjstz@126.com>
src/mainboard/sifive/hifive-unleashed/fixup_fdt.c