diff options
author | Charles Longeau <chl@cvs.openbsd.org> | 2011-05-02 22:13:28 +0000 |
---|---|---|
committer | Charles Longeau <chl@cvs.openbsd.org> | 2011-05-02 22:13:28 +0000 |
commit | c716f15e6fbebc84f7588d0472100951c4252c9a (patch) | |
tree | dbe06642e2823782933847c8bd3a7608417dcb82 | |
parent | a8cfd75cd2c14fe5f7a77d4721988294ae9a7c6e (diff) |
Do not check malloc return value against NULL, as M_WAITOK is used.
ok dlg@ krw@
-rw-r--r-- | sys/dev/pci/if_myx.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/sys/dev/pci/if_myx.c b/sys/dev/pci/if_myx.c index 685f7535fbd..c44a539124d 100644 --- a/sys/dev/pci/if_myx.c +++ b/sys/dev/pci/if_myx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_myx.c,v 1.12 2010/05/19 15:27:35 oga Exp $ */ +/* $OpenBSD: if_myx.c,v 1.13 2011/05/02 22:13:27 chl Exp $ */ /* * Copyright (c) 2007 Reyk Floeter <reyk@openbsd.org> @@ -1078,13 +1078,6 @@ myx_init_rings(struct myx_softc *sc) malloc(sc->sc_rxbufsize, M_DEVBUF, M_WAITOK); sc->sc_rxbufdesc[MYX_RXBIG] = (struct myx_rxbufdesc *) malloc(sc->sc_rxbufdescsize, M_DEVBUF, M_WAITOK); - if (sc->sc_rxbuf[MYX_RXSMALL] == NULL || - sc->sc_rxbufdesc[MYX_RXSMALL] == NULL || - sc->sc_rxbuf[MYX_RXBIG] == NULL || - sc->sc_rxbufdesc[MYX_RXBIG] == NULL) { - printf("%s: failed to allocate rx buffers\n", DEVNAME(sc)); - goto err; - } for (i = 0; i < sc->sc_rxndesc; i++) { /* |