diff options
author | 2005-10-09 04:44:45 +0000 | |
---|---|---|
committer | 2005-10-09 04:44:45 +0000 | |
commit | 84bbb13dc80ef115c4e04b19a6f49ab8e0fb00e1 (patch) | |
tree | 6fb6a0f5d77e66d15c680559f80a73eabb3d4695 | |
parent | fix incomplete ref count check in _dl_link_dlopen (use macro now). (diff) | |
download | wireguard-openbsd-84bbb13dc80ef115c4e04b19a6f49ab8e0fb00e1.tar.xz wireguard-openbsd-84bbb13dc80ef115c4e04b19a6f49ab8e0fb00e1.zip |
fix bus_dmamem_alloc() failure case.
-rw-r--r-- | sys/dev/pci/if_lge.c | 5 | ||||
-rw-r--r-- | sys/dev/pci/if_nge.c | 5 |
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; |