diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2010-07-02 04:03:32 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2010-07-02 04:03:32 +0000 |
commit | 94a549de0a7eed78dd2a34e742d1d3b1dd44204e (patch) | |
tree | ce794383107ade8d91b798f6c2b1fca8051d3cc2 /sys | |
parent | 8019ed2066ab47ee5b881fc753090d5fe400518e (diff) |
Proper fix for uninitialized variable warning.
Unbreaks build on several pci architectures.
Diffstat (limited to 'sys')
-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); |