Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb usbnet: Simplify usbnet_isdying.
details: https://anonhg.NetBSD.org/src/rev/9f423e713523
branches: trunk
changeset: 362483:9f423e713523
user: riastradh <riastradh%NetBSD.org@localhost>
date: Thu Mar 03 05:46:50 2022 +0000
description:
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.
diffstat:
sys/dev/usb/usbnet.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r b7e5f31a8555 -r 9f423e713523 sys/dev/usb/usbnet.c
--- a/sys/dev/usb/usbnet.c Wed Mar 02 19:32:15 2022 +0000
+++ b/sys/dev/usb/usbnet.c Thu Mar 03 05:46:50 2022 +0000
@@ -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 @@
bool
usbnet_isdying(struct usbnet *un)
{
- return un->un_pri == NULL || un->un_pri->unp_dying;
+ return un->un_pri->unp_dying;
}
Home |
Main Index |
Thread Index |
Old Index