diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2004-05-07 01:41:38 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2004-05-07 01:41:38 +0000 |
commit | d4224f2387b3c6ec3c9777add7a93bb02bdb72c4 (patch) | |
tree | b5d773c8c4a8a21cc1541419dd060e2788acf770 | |
parent | b5f3db6e6e90ad19a3f6c02a7ea7693f2d9945bc (diff) |
free the right thing on failure, in case this ever gets used
-rw-r--r-- | sys/dev/pci/ises.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/sys/dev/pci/ises.c b/sys/dev/pci/ises.c index 40cb6f8d7f1..0b9537724e7 100644 --- a/sys/dev/pci/ises.c +++ b/sys/dev/pci/ises.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ises.c,v 1.25 2004/05/04 16:59:31 grange Exp $ */ +/* $OpenBSD: ises.c,v 1.26 2004/05/07 01:41:37 tedu Exp $ */ /* * Copyright (c) 2000, 2001 Håkan Olsson (ho@crt.se) @@ -263,17 +263,19 @@ ises_attach(struct device *parent, struct device *self, void *aux) fail: switch (state) { /* Always fallthrough here. */ - case 4: + case 5: bus_dmamem_unmap(sc->sc_dmat, (caddr_t)&sc->sc_dma_data, sizeof sc->sc_dma_data); - case 3: + case 4: bus_dmamem_free(sc->sc_dmat, &seg, nsegs); - case 2: + case 3: bus_dmamap_destroy(sc->sc_dmat, sc->sc_dmamap); - case 1: + case 2: pci_intr_disestablish(pc, sc->sc_ih); - default: /* 0 */ + case 1: bus_space_unmap(sc->sc_memt, sc->sc_memh, memsize); + default: /* 0 */ + break; } return; } |