Don't call pci_read_config8 on devfun3 if it wasn't found.
Signed-off-by: Tobias Diedrich <[email protected]>
---
Index: src/southbridge/via/k8t890/k8t890_ctrl.c
===================================================================
--- src.orig/southbridge/via/k8t890/k8t890_ctrl.c 2010-10-27
12:46:56.000000000 +0200
+++ src/southbridge/via/k8t890/k8t890_ctrl.c 2010-10-27 13:24:59.000000000
+0200
@@ -60,6 +60,11 @@
/* WARNING: Need to copy some registers from NB (D0F3) to SB (D0F7). */
+ if (!devfun3) {
+ printk(BIOS_ERR, "NB D0F3 not found!");
+ return;
+ }
+
regm = pci_read_config8(devfun3, 0x88); /* Shadow mem CTRL */
pci_write_config8(dev, 0x57, regm);
--
coreboot mailing list: [email protected]
http://www.coreboot.org/mailman/listinfo/coreboot