Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/ic M_WAITOK cannot fail, so remove the test, otherwi...



details:   https://anonhg.NetBSD.org/src/rev/2c59d3adf42b
branches:  trunk
changeset: 826190:2c59d3adf42b
user:      maxv <maxv%NetBSD.org@localhost>
date:      Sun Aug 20 11:00:30 2017 +0000

description:
M_WAITOK cannot fail, so remove the test, otherwise it looks like an
spl leak; found by mootja

diffstat:

 sys/dev/ic/rrunner.c |  6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diffs (27 lines):

diff -r 3ddd4e03c760 -r 2c59d3adf42b sys/dev/ic/rrunner.c
--- a/sys/dev/ic/rrunner.c      Sun Aug 20 10:55:37 2017 +0000
+++ b/sys/dev/ic/rrunner.c      Sun Aug 20 11:00:30 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rrunner.c,v 1.83 2016/12/15 09:28:05 ozaki-r Exp $     */
+/*     $NetBSD: rrunner.c,v 1.84 2017/08/20 11:00:30 maxv Exp $        */
 
 /*
  * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rrunner.c,v 1.83 2016/12/15 09:28:05 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rrunner.c,v 1.84 2017/08/20 11:00:30 maxv Exp $");
 
 #include "opt_inet.h"
 
@@ -786,8 +786,6 @@
 
        recv = (struct esh_fp_ring_ctl *)
            malloc(sizeof(*recv), M_DEVBUF, M_WAITOK|M_ZERO);
-       if (recv == NULL)
-               return(ENOMEM);
        TAILQ_INIT(&recv->ec_queue);
 
        size = RR_FP_RECV_RING_SIZE * sizeof(struct rr_descr);



Home | Main Index | Thread Index | Old Index