Source-Changes-HG archive

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

[src/trunk]: src/sys/kern Ensure that dev is not NULL - CID/1428649



details:   https://anonhg.NetBSD.org/src/rev/f4ef588f6051
branches:  trunk
changeset: 359048:f4ef588f6051
user:      pgoyette <pgoyette%NetBSD.org@localhost>
date:      Fri Jan 26 22:58:09 2018 +0000

description:
Ensure that dev is not NULL - CID/1428649

diffstat:

 sys/kern/subr_autoconf.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r 477c2062bfe2 -r f4ef588f6051 sys/kern/subr_autoconf.c
--- a/sys/kern/subr_autoconf.c  Fri Jan 26 22:54:33 2018 +0000
+++ b/sys/kern/subr_autoconf.c  Fri Jan 26 22:58:09 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: subr_autoconf.c,v 1.255 2017/10/27 12:25:15 joerg Exp $ */
+/* $NetBSD: subr_autoconf.c,v 1.256 2018/01/26 22:58:09 pgoyette Exp $ */
 
 /*
  * Copyright (c) 1996, 2000 Christopher G. Demetriou
@@ -77,7 +77,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_autoconf.c,v 1.255 2017/10/27 12:25:15 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_autoconf.c,v 1.256 2018/01/26 22:58:09 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ddb.h"
@@ -1398,6 +1398,7 @@
 #ifdef DIAGNOSTIC
                printf("%s has not been converted to device_t\n", cd->cd_name);
 #endif
+               KASSERT(dev != NULL);
        }
        dev->dv_class = cd->cd_class;
        dev->dv_cfdata = cf;



Home | Main Index | Thread Index | Old Index