diff options
Diffstat (limited to 'sys/dev/usb')
| -rw-r--r-- | sys/dev/usb/if_umb.c | 12 | ||||
| -rw-r--r-- | sys/dev/usb/usbnet.c | 10 |
2 files changed, 6 insertions, 16 deletions
diff --git a/sys/dev/usb/if_umb.c b/sys/dev/usb/if_umb.c index 30b0f585d05..1aead36ba7e 100644 --- a/sys/dev/usb/if_umb.c +++ b/sys/dev/usb/if_umb.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_umb.c,v 1.19 2020/03/24 07:12:16 maxv Exp $ */ +/* $NetBSD: if_umb.c,v 1.20 2021/06/16 00:21:19 riastradh Exp $ */ /* $OpenBSD: if_umb.c,v 1.20 2018/09/10 17:00:45 gerhard Exp $ */ /* @@ -26,7 +26,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_umb.c,v 1.19 2020/03/24 07:12:16 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_umb.c,v 1.20 2021/06/16 00:21:19 riastradh Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -311,7 +311,6 @@ umb_attach(device_t parent, device_t self, void *aux) int altnum; int s; struct ifnet *ifp; - int rv; sc->sc_dev = self; sc->sc_udev = uiaa->uiaa_device; @@ -532,12 +531,7 @@ umb_attach(device_t parent, device_t self, void *aux) IFQ_SET_READY(&ifp->if_snd); /* attach the interface */ - rv = if_initialize(ifp); - if (rv != 0) { - aprint_error_dev(self, "if_initialize failed(%d)\n", rv); - splx(s); - return; - } + if_initialize(ifp); if_register(ifp); if_alloc_sadl(ifp); diff --git a/sys/dev/usb/usbnet.c b/sys/dev/usb/usbnet.c index febe25118db..3a825d3deb1 100644 --- a/sys/dev/usb/usbnet.c +++ b/sys/dev/usb/usbnet.c @@ -1,4 +1,4 @@ -/* $NetBSD: usbnet.c,v 1.41 2021/04/25 05:15:20 rin Exp $ */ +/* $NetBSD: usbnet.c,v 1.42 2021/06/16 00:21:19 riastradh Exp $ */ /* * Copyright (c) 2019 Matthew R. Green @@ -33,7 +33,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: usbnet.c,v 1.41 2021/04/25 05:15:20 rin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: usbnet.c,v 1.42 2021/06/16 00:21:19 riastradh Exp $"); #include <sys/param.h> #include <sys/kernel.h> @@ -1452,11 +1452,7 @@ usbnet_attach_ifp(struct usbnet *un, unp->unp_link = true; /* Attach the interface. */ - int rv = if_initialize(ifp); - if (rv != 0) { - aprint_error_dev(un->un_dev, "if_initialize failed: %d\n", rv); - return; - } + if_initialize(ifp); if (ifp->_if_input == NULL) ifp->if_percpuq = if_percpuq_create(ifp); if_register(ifp); |
