diff options
| author | riastradh <riastradh@NetBSD.org> | 2022-08-20 14:05:58 +0000 |
|---|---|---|
| committer | riastradh <riastradh@NetBSD.org> | 2022-08-20 14:05:58 +0000 |
| commit | fa4835c5cca20f686bb8a6687da249cc7f94b363 (patch) | |
| tree | b2422aa51320eac67a6bb6fd8e78192661c65b84 /sys/dev | |
| parent | bd79f1766a2dea7bad14caa15eecd0197bc5b71d (diff) | |
usbnet(9): Omit needless un->un_intr test in usbnet_pipe_intr.
un->un_intr can't change after attach, and we don't open the pipe if
it's null. So no need to test it.
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/usb/usbnet.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/usb/usbnet.c b/sys/dev/usb/usbnet.c index 177bda8d41d..300b19a529f 100644 --- a/sys/dev/usb/usbnet.c +++ b/sys/dev/usb/usbnet.c @@ -1,4 +1,4 @@ -/* $NetBSD: usbnet.c,v 1.99 2022/08/20 12:30:00 riastradh Exp $ */ +/* $NetBSD: usbnet.c,v 1.100 2022/08/20 14:05: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.99 2022/08/20 12:30:00 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: usbnet.c,v 1.100 2022/08/20 14:05:58 riastradh Exp $"); #include <sys/param.h> #include <sys/kernel.h> @@ -458,9 +458,9 @@ usbnet_pipe_intr(struct usbd_xfer *xfer, void *priv, usbd_status status) USBNETHIST_FUNC(); struct usbnet * const un = priv; struct usbnet_private * const unp = un->un_pri; - struct usbnet_intr * const uni = un->un_intr; + struct usbnet_intr * const uni __unused = un->un_intr; - if (uni == NULL || usbnet_isdying(un) || unp->unp_stopping || + if (usbnet_isdying(un) || unp->unp_stopping || status == USBD_INVAL || status == USBD_NOT_STARTED || status == USBD_CANCELLED) { USBNETHIST_CALLARGS("%jd: uni %#jx d/s %#jx status %#jx", |
