Patchwork [5/8] ASUS M2V support: k8t890_ctrl.c bugfix

login
register
about
Submitter Tobias Diedrich
Date 2010-10-27 11:28:05
Message ID <20101027112804.GJ17791@yumi.tdiedrich.de>
Download mbox | patch
Permalink /patch/2183/
State Superseded
Headers show

Comments

Tobias Diedrich - 2010-10-27 11:28:05
Don't call pci_read_config8 on devfun3 if it wasn't found.

Signed-off-by: Tobias Diedrich <ranma+coreboot@tdiedrich.de>

---

Patch

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);