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.
This commit is contained in:
parent
3aac71e12f
commit
806f4738ee
@ -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 <matt@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";
|
||||
|
Loading…
Reference in New Issue
Block a user