From c716f15e6fbebc84f7588d0472100951c4252c9a Mon Sep 17 00:00:00 2001 From: Charles Longeau Date: Mon, 2 May 2011 22:13:28 +0000 Subject: Do not check malloc return value against NULL, as M_WAITOK is used. ok dlg@ krw@ --- sys/dev/pci/if_myx.c | 9 +-------- 1 file changed, 1 insertion(+), 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 @@ -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++) { /* -- cgit v1.2.3