Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/eisa Delete dead null test after malloc(M_WAITOK).
details: https://anonhg.NetBSD.org/src/rev/1d522fffc9e4
branches: trunk
changeset: 453882:1d522fffc9e4
user: riastradh <riastradh%NetBSD.org@localhost>
date: Fri Aug 30 00:36:53 2019 +0000
description:
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.
diffstat:
sys/dev/eisa/if_fea.c | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)
diffs (29 lines):
diff -r 6aeb21ee575a -r 1d522fffc9e4 sys/dev/eisa/if_fea.c
--- a/sys/dev/eisa/if_fea.c Fri Aug 30 00:33:55 2019 +0000
+++ b/sys/dev/eisa/if_fea.c Fri Aug 30 00:36:53 2019 +0000
@@ -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@localhost>
@@ -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 @@
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";
Home |
Main Index |
Thread Index |
Old Index