diff options
| author | 2010-07-02 04:03:31 +0000 | |
|---|---|---|
| committer | 2010-07-02 04:03:31 +0000 | |
| commit | 8289869652ce8b5126476b68a2127f51748dea38 (patch) | |
| tree | 5d71b4ef31725fe95ccc558e48190346a59cade1 /sys/dev/pci/pci.c | |
| parent | don't reference an item after it has been returned to the pool (diff) | |
| download | wireguard-openbsd-8289869652ce8b5126476b68a2127f51748dea38.tar.xz wireguard-openbsd-8289869652ce8b5126476b68a2127f51748dea38.zip | |
Proper fix for uninitialized variable warning.
Unbreaks build on several pci architectures.
Diffstat (limited to 'sys/dev/pci/pci.c')
| -rw-r--r-- | sys/dev/pci/pci.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c index c6b4ba07860..a6835016216 100644 --- a/sys/dev/pci/pci.c +++ b/sys/dev/pci/pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pci.c,v 1.79 2010/07/02 03:10:47 tedu Exp $ */ +/* $OpenBSD: pci.c,v 1.80 2010/07/02 04:03:31 kettenis Exp $ */ /* $NetBSD: pci.c,v 1.31 1997/06/06 23:48:04 thorpej Exp $ */ /* @@ -1066,10 +1066,10 @@ pci_enable_vga(pci_chipset_tag_t pc, pcitag_t tag) void pci_route_vga(struct pci_softc *sc) { - pci_chipset_tag_t pc = sc->sc_bridgetag; + pci_chipset_tag_t pc = sc->sc_pc; pcireg_t bc; - if (pc == NULL) + if (sc->sc_bridgetag == NULL) return; bc = pci_conf_read(pc, *sc->sc_bridgetag, PPB_REG_BRIDGECONTROL); @@ -1082,10 +1082,10 @@ pci_route_vga(struct pci_softc *sc) void pci_unroute_vga(struct pci_softc *sc) { - pci_chipset_tag_t pc = sc->sc_bridgetag; + pci_chipset_tag_t pc = sc->sc_pc; pcireg_t bc; - if (pc == NULL) + if (sc->sc_bridgetag == NULL) return; bc = pci_conf_read(pc, *sc->sc_bridgetag, PPB_REG_BRIDGECONTROL); |
