From 98b5612b4786215662d305a03aa30d271e848443 Mon Sep 17 00:00:00 2001 From: Eivind Eklund Date: Wed, 9 Dec 1998 02:18:53 +0000 Subject: [PATCH] malloc(xxx, yyy, M_WAITOK) does not fail. This probably explains why the bug in the check had never been discovered. --- sys/dev/pdq/if_fea.c | 8 ++------ sys/i386/eisa/if_fea.c | 8 ++------ 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/sys/dev/pdq/if_fea.c b/sys/dev/pdq/if_fea.c index 4113b1ac7ca0..d58cdc5f42e4 100644 --- a/sys/dev/pdq/if_fea.c +++ b/sys/dev/pdq/if_fea.c @@ -21,7 +21,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: if_fea.c,v 1.9 1998/02/20 13:11:46 bde Exp $ + * $Id: if_fea.c,v 1.10 1998/08/24 02:28:15 bde Exp $ */ /* @@ -205,11 +205,7 @@ pdq_eisa_attach( irq = TAILQ_FIRST(&ed->ioconf.irqs)->irq_no; - sc = (pdq_softc_t *) malloc(sizeof(*sc), M_DEVBUF, M_WAITOK); - if (sc == NULL) { - printf("fea%d: malloc failed!\n", sc->sc_if.if_unit); - return -1; - } + sc = malloc(sizeof(*sc), M_DEVBUF, M_WAITOK); pdqs_eisa[ed->unit] = sc; bzero(sc, sizeof(pdq_softc_t)); /* Zero out the softc*/ diff --git a/sys/i386/eisa/if_fea.c b/sys/i386/eisa/if_fea.c index 4113b1ac7ca0..d58cdc5f42e4 100644 --- a/sys/i386/eisa/if_fea.c +++ b/sys/i386/eisa/if_fea.c @@ -21,7 +21,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: if_fea.c,v 1.9 1998/02/20 13:11:46 bde Exp $ + * $Id: if_fea.c,v 1.10 1998/08/24 02:28:15 bde Exp $ */ /* @@ -205,11 +205,7 @@ pdq_eisa_attach( irq = TAILQ_FIRST(&ed->ioconf.irqs)->irq_no; - sc = (pdq_softc_t *) malloc(sizeof(*sc), M_DEVBUF, M_WAITOK); - if (sc == NULL) { - printf("fea%d: malloc failed!\n", sc->sc_if.if_unit); - return -1; - } + sc = malloc(sizeof(*sc), M_DEVBUF, M_WAITOK); pdqs_eisa[ed->unit] = sc; bzero(sc, sizeof(pdq_softc_t)); /* Zero out the softc*/