summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorriastradh <riastradh@NetBSD.org>2022-03-03 05:47:58 +0000
committerriastradh <riastradh@NetBSD.org>2022-03-03 05:47:58 +0000
commit628352291cea4b353952e749f83e1195e4dd14d2 (patch)
tree66276eaaff71610363d8c21ad6249d28f66dbd04 /sys/dev
parent557f4a2e89b7e21cc0792789628eb7c81bed77d8 (diff)
usbnet: Omit needless unp == NULL test in usbnet_tick_task.
The task is never scheduled until after un->un_pri is initialized, and un->un_pri isn't nulled until after the callout and task are quiescent.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/usb/usbnet.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/sys/dev/usb/usbnet.c b/sys/dev/usb/usbnet.c
index aabd0995180..4d9823f1188 100644
--- a/sys/dev/usb/usbnet.c
+++ b/sys/dev/usb/usbnet.c
@@ -1,4 +1,4 @@
-/* $NetBSD: usbnet.c,v 1.53 2022/03/03 05:47:50 riastradh Exp $ */
+/* $NetBSD: usbnet.c,v 1.54 2022/03/03 05:47:58 riastradh Exp $ */
/*
* Copyright (c) 2019 Matthew R. Green
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: usbnet.c,v 1.53 2022/03/03 05:47:50 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usbnet.c,v 1.54 2022/03/03 05:47:58 riastradh Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -1227,9 +1227,6 @@ usbnet_tick_task(void *arg)
struct usbnet * const un = arg;
struct usbnet_private * const unp = un->un_pri;
- if (unp == NULL)
- return;
-
USBNETHIST_CALLARGSN(8, "%jd: enter", unp->unp_number, 0, 0, 0);
mutex_enter(&unp->unp_core_lock);