aboutsummaryrefslogtreecommitdiff
path: root/sys/pci
diff options
context:
space:
mode:
authorBill Paul <wpaul@FreeBSD.org>1999-08-31 05:20:59 +0000
committerBill Paul <wpaul@FreeBSD.org>1999-08-31 05:20:59 +0000
commitca11eaac63faf40b3b94c047f2e9a26ce186796c (patch)
treead0f2e21d466b53631942eb90f598b6211eabac0 /sys/pci
parentead4c37a5d8172d88956369616d5eda24d82bb5c (diff)
Notes
Diffstat (limited to 'sys/pci')
-rw-r--r--sys/pci/if_ste.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/pci/if_ste.c b/sys/pci/if_ste.c
index d3fb8b378f08..eac1a18a2eb5 100644
--- a/sys/pci/if_ste.c
+++ b/sys/pci/if_ste.c
@@ -1043,7 +1043,10 @@ static int ste_attach(dev)
if (ste_read_eeprom(sc, (caddr_t)&sc->arpcom.ac_enaddr,
STE_EEADDR_NODE0, 3, 0)) {
printf("ste%d: failed to read station address\n", unit);
- free(sc, M_DEVBUF);
+ bus_teardown_intr(dev, sc->ste_irq, sc->ste_intrhand);
+ bus_release_resource(dev, SYS_RES_IRQ, 0, sc->ste_irq);
+ bus_release_resource(dev, STE_RES, STE_RID, sc->ste_res);
+ error = ENXIO;;
goto fail;
}
@@ -1060,8 +1063,11 @@ static int ste_attach(dev)
M_NOWAIT, 0, 0xffffffff, PAGE_SIZE, 0);
if (sc->ste_ldata == NULL) {
- free(sc, M_DEVBUF);
printf("ste%d: no memory for list buffers!\n", unit);
+ bus_teardown_intr(dev, sc->ste_irq, sc->ste_intrhand);
+ bus_release_resource(dev, SYS_RES_IRQ, 0, sc->ste_irq);
+ bus_release_resource(dev, STE_RES, STE_RID, sc->ste_res);
+ error = ENXIO;
goto fail;
}