Module Name: src Committed By: riastradh Date: Thu Mar 3 05:46:50 UTC 2022
Modified Files: src/sys/dev/usb: usbnet.c Log Message: usbnet: Simplify usbnet_isdying. usbnet_detach (or its caller) stops all users before it returns. If un->un_pri is null at this point, there's a bug -- something didn't wait for everything to finish before calling usbnet_detach. To generate a diff of this commit: cvs rdiff -u -r1.44 -r1.45 src/sys/dev/usb/usbnet.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/usbnet.c diff -u src/sys/dev/usb/usbnet.c:1.44 src/sys/dev/usb/usbnet.c:1.45 --- src/sys/dev/usb/usbnet.c:1.44 Sat Jan 29 21:37:07 2022 +++ src/sys/dev/usb/usbnet.c Thu Mar 3 05:46:50 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: usbnet.c,v 1.44 2022/01/29 21:37:07 riastradh Exp $ */ +/* $NetBSD: usbnet.c,v 1.45 2022/03/03 05:46:50 riastradh Exp $ */ /* * Copyright (c) 2019 Matthew R. Green @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: usbnet.c,v 1.44 2022/01/29 21:37:07 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: usbnet.c,v 1.45 2022/03/03 05:46:50 riastradh Exp $"); #include <sys/param.h> #include <sys/kernel.h> @@ -1322,7 +1322,7 @@ usbnet_havelink(struct usbnet *un) bool usbnet_isdying(struct usbnet *un) { - return un->un_pri == NULL || un->un_pri->unp_dying; + return un->un_pri->unp_dying; }