Patrick Georgi has submitted this change and it was merged. ( https://review.coreboot.org/c/coreboot/+/34573 )
Change subject: mb/asus/kfsn4-dre: Return early if CK804 not found ......................................................................
mb/asus/kfsn4-dre: Return early if CK804 not found
It probably doesn't make sense to continue if the CK804 isn't found, and doing so would perform uninitialized reads of the busn and io_base arrays anyway, so let's return early.
Change-Id: I13c663314496caf51a57da7f27f9ea24e3d7fcbd Signed-off-by: Jacob Garber jgarber1@ualberta.ca Found-by: Coverity CID 1370586 Reviewed-on: https://review.coreboot.org/c/coreboot/+/34573 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Paul Menzel paulepanter@users.sourceforge.net Reviewed-by: Patrick Georgi pgeorgi@google.com --- M src/mainboard/asus/kfsn4-dre/romstage.c 1 file changed, 3 insertions(+), 1 deletion(-)
Approvals: build bot (Jenkins): Verified Patrick Georgi: Looks good to me, approved Paul Menzel: Looks good to me, but someone else must approve
diff --git a/src/mainboard/asus/kfsn4-dre/romstage.c b/src/mainboard/asus/kfsn4-dre/romstage.c index 7b20243..22eb115 100644 --- a/src/mainboard/asus/kfsn4-dre/romstage.c +++ b/src/mainboard/asus/kfsn4-dre/romstage.c @@ -132,8 +132,10 @@ } }
- if (ck804_num < 1) + if (ck804_num < 1) { printk(BIOS_WARNING, "CK804 not found at device base unit id %02x!\n", bus_unit_id); + return; + }
ck804_early_set_port(ck804_num, busn, io_base);