diff options
author | 2010-07-02 03:10:47 +0000 | |
---|---|---|
committer | 2010-07-02 03:10:47 +0000 | |
commit | a3032cf6d895352a29af9ce1cc001df05491adf4 (patch) | |
tree | 4b6fa8a472aabf15f60bfc1d7f135d83eca9f65e | |
parent | on error, getuint() will return UINT_MAX. Instead of actually using (diff) | |
download | wireguard-openbsd-a3032cf6d895352a29af9ce1cc001df05491adf4.tar.xz wireguard-openbsd-a3032cf6d895352a29af9ce1cc001df05491adf4.zip |
the variables work better when initialized. ok deraadt
-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 dbd29bfded2..c6b4ba07860 100644 --- a/sys/dev/pci/pci.c +++ b/sys/dev/pci/pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pci.c,v 1.78 2010/06/30 04:31:37 mlarkin Exp $ */ +/* $OpenBSD: pci.c,v 1.79 2010/07/02 03:10:47 tedu 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; + pci_chipset_tag_t pc = sc->sc_bridgetag; pcireg_t bc; - if (sc->sc_bridgetag == NULL) + if (pc == 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; + pci_chipset_tag_t pc = sc->sc_bridgetag; pcireg_t bc; - if (sc->sc_bridgetag == NULL) + if (pc == NULL) return; bc = pci_conf_read(pc, *sc->sc_bridgetag, PPB_REG_BRIDGECONTROL); |