summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad Smith <brad@cvs.openbsd.org>2005-10-09 04:44:46 +0000
committerBrad Smith <brad@cvs.openbsd.org>2005-10-09 04:44:46 +0000
commit3407cc2b327ea2efe0f851d52f8ce9efe3840859 (patch)
tree770e4573a20948c2f187f1e6ae721607db3f994f
parentdb3316a3a24b2daecd14456774e4f3268e91f065 (diff)
fix bus_dmamem_alloc() failure case.
-rw-r--r--sys/dev/pci/if_lge.c5
-rw-r--r--sys/dev/pci/if_nge.c5
2 files changed, 4 insertions, 6 deletions
diff --git a/sys/dev/pci/if_lge.c b/sys/dev/pci/if_lge.c
index 3dfc7a6b365..3e00db415cb 100644
--- a/sys/dev/pci/if_lge.c
+++ b/sys/dev/pci/if_lge.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_lge.c,v 1.33 2005/10/09 02:00:57 brad Exp $ */
+/* $OpenBSD: if_lge.c,v 1.34 2005/10/09 04:44:45 brad Exp $ */
/*
* Copyright (c) 2001 Wind River Systems
* Copyright (c) 1997, 1998, 1999, 2000, 2001
@@ -766,8 +766,7 @@ lge_alloc_jumbo_mem(struct lge_softc *sc)
if (bus_dmamem_alloc(sc->sc_dmatag, LGE_JMEM, PAGE_SIZE, 0,
&seg, 1, &rseg, BUS_DMA_NOWAIT)) {
printf("%s: can't alloc rx buffers\n", sc->sc_dv.dv_xname);
- error = ENOBUFS;
- goto out;
+ return (ENOBUFS);
}
state = 1;
diff --git a/sys/dev/pci/if_nge.c b/sys/dev/pci/if_nge.c
index 5bb1ee24176..2f3c9dab67e 100644
--- a/sys/dev/pci/if_nge.c
+++ b/sys/dev/pci/if_nge.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_nge.c,v 1.45 2005/09/11 18:17:08 mickey Exp $ */
+/* $OpenBSD: if_nge.c,v 1.46 2005/10/09 04:44:45 brad Exp $ */
/*
* Copyright (c) 2001 Wind River Systems
* Copyright (c) 1997, 1998, 1999, 2000, 2001
@@ -1115,8 +1115,7 @@ nge_alloc_jumbo_mem(sc)
if (bus_dmamem_alloc(sc->sc_dmatag, NGE_JMEM, PAGE_SIZE, 0,
&seg, 1, &rseg, BUS_DMA_NOWAIT)) {
printf("%s: can't alloc rx buffers\n", sc->sc_dv.dv_xname);
- error = ENOBUFS;
- goto out;
+ return (ENOBUFS);
}
state = 1;