Module Name:    src
Committed By:   riastradh
Date:           Fri Aug 30 00:36:53 UTC 2019

Modified Files:
        src/sys/dev/eisa: if_fea.c

Log Message:
Delete dead null test after malloc(M_WAITOK).

Reported as a possible null pointer dereference by Dr Silvio Cesare
of InfoSect, but the branch is dead code anyway.


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/sys/dev/eisa/if_fea.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/eisa/if_fea.c
diff -u src/sys/dev/eisa/if_fea.c:1.47 src/sys/dev/eisa/if_fea.c:1.48
--- src/sys/dev/eisa/if_fea.c:1.47	Thu Jul 14 10:19:06 2016
+++ src/sys/dev/eisa/if_fea.c	Fri Aug 30 00:36:53 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_fea.c,v 1.47 2016/07/14 10:19:06 msaitoh Exp $	*/
+/*	$NetBSD: if_fea.c,v 1.48 2019/08/30 00:36:53 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 1995, 1996 Matt Thomas <m...@3am-software.com>
@@ -33,7 +33,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_fea.c,v 1.47 2016/07/14 10:19:06 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_fea.c,v 1.48 2019/08/30 00:36:53 riastradh Exp $");
 
 #include "opt_inet.h"
 
@@ -245,10 +245,6 @@ pdq_eisa_attach(
     int irq = ffs(ed->ioconf.irq) - 1;
 
     sc = (pdq_softc_t *) malloc(sizeof(*sc), M_DEVBUF, M_WAITOK|M_ZERO);
-    if (sc == NULL) {
-	printf("fea%d: malloc failed!\n", sc->sc_if.if_unit);
-	return -1;
-    }
     pdqs_eisa[ed->unit] = sc;
 
     sc->sc_if.if_name = "fea";

Reply via email to