Module Name: src Committed By: jdolecek Date: Sat Apr 21 15:53:25 UTC 2018
Modified Files: src/sys/dev/usb: xhci.c Log Message: add KASSERT() that sc_child* is set to NULL after child detach; just for readability, it's not immediatelly obvious this is done in xhci_childdet() no functional changes To generate a diff of this commit: cvs rdiff -u -r1.87 -r1.88 src/sys/dev/usb/xhci.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/usb/xhci.c diff -u src/sys/dev/usb/xhci.c:1.87 src/sys/dev/usb/xhci.c:1.88 --- src/sys/dev/usb/xhci.c:1.87 Mon Apr 9 16:21:11 2018 +++ src/sys/dev/usb/xhci.c Sat Apr 21 15:53:24 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: xhci.c,v 1.87 2018/04/09 16:21:11 jakllsch Exp $ */ +/* $NetBSD: xhci.c,v 1.88 2018/04/21 15:53:24 jdolecek Exp $ */ /* * Copyright (c) 2013 Jonathan A. Kollasch @@ -34,7 +34,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.87 2018/04/09 16:21:11 jakllsch Exp $"); +__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.88 2018/04/21 15:53:24 jdolecek Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -593,12 +593,14 @@ xhci_detach(struct xhci_softc *sc, int f rv = config_detach(sc->sc_child2, flags); if (rv != 0) return rv; + KASSERT(sc->sc_child2 == NULL); } if (sc->sc_child != NULL) { rv = config_detach(sc->sc_child, flags); if (rv != 0) return rv; + KASSERT(sc->sc_child == NULL); } /* XXX unconfigure/free slots */