summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2010-07-02 03:10:48 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2010-07-02 03:10:48 +0000
commit6d99ced538a18cfb44f9fa76abd032b12114620d (patch)
tree1727873ac5458d9d41c98c70da9356263072f20c
parent506e5b6520a929b003eaa3dba4990856e0fd2dfd (diff)
the variables work better when initialized. ok deraadt
-rw-r--r--sys/dev/pci/pci.c10
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);