diff options
author | thompsa <thompsa@FreeBSD.org> | 2009-02-01 00:51:25 +0000 |
---|---|---|
committer | thompsa <thompsa@FreeBSD.org> | 2009-02-01 00:51:25 +0000 |
commit | ee1591cd11414dcc5bbcb3df9aadb4e83675fc9b (patch) | |
tree | e15ef7324aee6485eced7ea38434589677635ff5 | |
parent | 6e8acdecbedf9f7a7cabde60d53d872fe4f3579b (diff) | |
download | FreeBSD-src-ee1591cd11414dcc5bbcb3df9aadb4e83675fc9b.zip FreeBSD-src-ee1591cd11414dcc5bbcb3df9aadb4e83675fc9b.tar.gz |
Remove check for null softc in attach, it can never happen.
44 files changed, 0 insertions, 140 deletions
diff --git a/sys/dev/usb2/controller/at91dci_atmelarm.c b/sys/dev/usb2/controller/at91dci_atmelarm.c index 5ce5625..496eade 100644 --- a/sys/dev/usb2/controller/at91dci_atmelarm.c +++ b/sys/dev/usb2/controller/at91dci_atmelarm.c @@ -131,9 +131,6 @@ at91_udp_attach(device_t dev) int err; int rid; - if (sc == NULL) { - return (ENXIO); - } /* setup AT9100 USB device controller interface softc */ sc->sc_dci.sc_clocks_on = &at91_udp_clocks_on; diff --git a/sys/dev/usb2/controller/ehci2_pci.c b/sys/dev/usb2/controller/ehci2_pci.c index 4ca43d9..038211d 100644 --- a/sys/dev/usb2/controller/ehci2_pci.c +++ b/sys/dev/usb2/controller/ehci2_pci.c @@ -227,10 +227,6 @@ ehci_pci_attach(device_t self) int err; int rid; - if (sc == NULL) { - device_printf(self, "Could not allocate sc\n"); - return (ENXIO); - } /* initialise some bus fields */ sc->sc_bus.parent = self; sc->sc_bus.devices = sc->sc_devices; diff --git a/sys/dev/usb2/controller/musb2_otg_atmelarm.c b/sys/dev/usb2/controller/musb2_otg_atmelarm.c index 44fa320..6477c97 100644 --- a/sys/dev/usb2/controller/musb2_otg_atmelarm.c +++ b/sys/dev/usb2/controller/musb2_otg_atmelarm.c @@ -90,11 +90,7 @@ musbotg_attach(device_t dev) int err; int rid; - if (sc == NULL) { - return (ENXIO); - } /* setup MUSB OTG USB controller interface softc */ - sc->sc_otg.sc_clocks_on = &musbotg_clocks_on; sc->sc_otg.sc_clocks_off = &musbotg_clocks_off; sc->sc_otg.sc_clocks_arg = sc; diff --git a/sys/dev/usb2/controller/ohci2_atmelarm.c b/sys/dev/usb2/controller/ohci2_atmelarm.c index 41e7b10..a7f086c 100644 --- a/sys/dev/usb2/controller/ohci2_atmelarm.c +++ b/sys/dev/usb2/controller/ohci2_atmelarm.c @@ -69,9 +69,6 @@ ohci_atmelarm_attach(device_t dev) int err; int rid; - if (sc == NULL) { - return (ENXIO); - } /* initialise some bus fields */ sc->sc_ohci.sc_bus.parent = dev; sc->sc_ohci.sc_bus.devices = sc->sc_ohci.sc_devices; diff --git a/sys/dev/usb2/controller/ohci2_pci.c b/sys/dev/usb2/controller/ohci2_pci.c index 09a4cdf..7d3506e 100644 --- a/sys/dev/usb2/controller/ohci2_pci.c +++ b/sys/dev/usb2/controller/ohci2_pci.c @@ -195,10 +195,6 @@ ohci_pci_attach(device_t self) int rid; int err; - if (sc == NULL) { - device_printf(self, "Could not allocate sc\n"); - return (ENXIO); - } /* initialise some bus fields */ sc->sc_bus.parent = self; sc->sc_bus.devices = sc->sc_devices; diff --git a/sys/dev/usb2/controller/uhci2_pci.c b/sys/dev/usb2/controller/uhci2_pci.c index 70cbd3a..725cd84 100644 --- a/sys/dev/usb2/controller/uhci2_pci.c +++ b/sys/dev/usb2/controller/uhci2_pci.c @@ -246,10 +246,6 @@ uhci_pci_attach(device_t self) int rid; int err; - if (sc == NULL) { - device_printf(self, "Could not allocate sc\n"); - return (ENXIO); - } /* initialise some bus fields */ sc->sc_bus.parent = self; sc->sc_bus.devices = sc->sc_devices; diff --git a/sys/dev/usb2/controller/uss820dci_atmelarm.c b/sys/dev/usb2/controller/uss820dci_atmelarm.c index 1d484a2..387c167 100644 --- a/sys/dev/usb2/controller/uss820dci_atmelarm.c +++ b/sys/dev/usb2/controller/uss820dci_atmelarm.c @@ -134,10 +134,6 @@ uss820_atmelarm_attach(device_t dev) int err; int rid; - if (sc == NULL) { - return (ENXIO); - } - /* initialise some bus fields */ sc->sc_bus.parent = dev; sc->sc_bus.devices = sc->sc_devices; diff --git a/sys/dev/usb2/core/usb2_compat_linux.c b/sys/dev/usb2/core/usb2_compat_linux.c index b632cf0..4f52ea3 100644 --- a/sys/dev/usb2/core/usb2_compat_linux.c +++ b/sys/dev/usb2/core/usb2_compat_linux.c @@ -246,9 +246,6 @@ usb_linux_attach(device_t dev) struct usb_device *p_dev; const struct usb_device_id *id = NULL; - if (sc == NULL) { - return (ENOMEM); - } mtx_lock(&Giant); LIST_FOREACH(udrv, &usb_linux_driver_list, linux_driver_list) { id = usb_linux_lookup_id(udrv->id_table, uaa); diff --git a/sys/dev/usb2/core/usb2_hub.c b/sys/dev/usb2/core/usb2_hub.c index 709fdeb..47db119 100644 --- a/sys/dev/usb2/core/usb2_hub.c +++ b/sys/dev/usb2/core/usb2_hub.c @@ -649,9 +649,6 @@ uhub_attach(device_t dev) uint8_t iface_index; usb2_error_t err; - if (sc == NULL) { - return (ENOMEM); - } sc->sc_udev = udev; sc->sc_dev = dev; diff --git a/sys/dev/usb2/ethernet/if_aue2.c b/sys/dev/usb2/ethernet/if_aue2.c index e923615..f30a712 100644 --- a/sys/dev/usb2/ethernet/if_aue2.c +++ b/sys/dev/usb2/ethernet/if_aue2.c @@ -752,9 +752,6 @@ aue_attach(device_t dev) int32_t error; uint8_t iface_index; - if (sc == NULL) { - return (ENOMEM); - } sc->sc_udev = uaa->device; sc->sc_dev = dev; sc->sc_unit = device_get_unit(dev); diff --git a/sys/dev/usb2/ethernet/if_axe2.c b/sys/dev/usb2/ethernet/if_axe2.c index d152dc2..dd154c0 100644 --- a/sys/dev/usb2/ethernet/if_axe2.c +++ b/sys/dev/usb2/ethernet/if_axe2.c @@ -629,9 +629,6 @@ axe_attach(device_t dev) int32_t error; uint8_t iface_index; - if (sc == NULL) { - return (ENOMEM); - } sc->sc_udev = uaa->device; sc->sc_dev = dev; sc->sc_unit = device_get_unit(dev); diff --git a/sys/dev/usb2/ethernet/if_cdce2.c b/sys/dev/usb2/ethernet/if_cdce2.c index 6b56c7e..89081d7e 100644 --- a/sys/dev/usb2/ethernet/if_cdce2.c +++ b/sys/dev/usb2/ethernet/if_cdce2.c @@ -231,9 +231,6 @@ cdce_attach(device_t dev) uint8_t eaddr[ETHER_ADDR_LEN]; char eaddr_str[5 * ETHER_ADDR_LEN]; /* approx */ - if (sc == NULL) { - return (ENOMEM); - } sc->sc_udev = uaa->device; sc->sc_dev = dev; sc->sc_unit = device_get_unit(dev); diff --git a/sys/dev/usb2/ethernet/if_cue2.c b/sys/dev/usb2/ethernet/if_cue2.c index fc1adfb..9a765d8 100644 --- a/sys/dev/usb2/ethernet/if_cue2.c +++ b/sys/dev/usb2/ethernet/if_cue2.c @@ -397,9 +397,6 @@ cue_attach(device_t dev) uint8_t iface_index; int32_t error; - if (sc == NULL) { - return (ENOMEM); - } sc->sc_udev = uaa->device; sc->sc_dev = dev; sc->sc_unit = device_get_unit(dev); diff --git a/sys/dev/usb2/ethernet/if_kue2.c b/sys/dev/usb2/ethernet/if_kue2.c index b579b1d..b4e6bbe 100644 --- a/sys/dev/usb2/ethernet/if_kue2.c +++ b/sys/dev/usb2/ethernet/if_kue2.c @@ -459,9 +459,6 @@ kue_attach(device_t dev) int32_t error; uint8_t iface_index; - if (sc == NULL) { - return (ENOMEM); - } sc->sc_udev = uaa->device; sc->sc_dev = dev; sc->sc_unit = device_get_unit(dev); diff --git a/sys/dev/usb2/ethernet/if_rue2.c b/sys/dev/usb2/ethernet/if_rue2.c index fe34d1f..93e306f 100644 --- a/sys/dev/usb2/ethernet/if_rue2.c +++ b/sys/dev/usb2/ethernet/if_rue2.c @@ -637,9 +637,6 @@ rue_attach(device_t dev) int32_t error; uint8_t iface_index; - if (sc == NULL) { - return (ENOMEM); - } sc->sc_udev = uaa->device; sc->sc_dev = dev; sc->sc_unit = device_get_unit(dev); diff --git a/sys/dev/usb2/ethernet/if_udav2.c b/sys/dev/usb2/ethernet/if_udav2.c index 99ee63c..a5fde41 100644 --- a/sys/dev/usb2/ethernet/if_udav2.c +++ b/sys/dev/usb2/ethernet/if_udav2.c @@ -267,9 +267,6 @@ udav_attach(device_t dev) int32_t error; uint8_t iface_index; - if (sc == NULL) { - return (ENOMEM); - } sc->sc_udev = uaa->device; sc->sc_dev = dev; sc->sc_unit = device_get_unit(dev); diff --git a/sys/dev/usb2/input/uhid2.c b/sys/dev/usb2/input/uhid2.c index 95d03ff..4713b06 100644 --- a/sys/dev/usb2/input/uhid2.c +++ b/sys/dev/usb2/input/uhid2.c @@ -660,9 +660,6 @@ uhid_attach(device_t dev) DPRINTFN(10, "sc=%p\n", sc); - if (sc == NULL) { - return (ENOMEM); - } device_set_usb2_desc(dev); mtx_init(&sc->sc_mtx, "uhid lock", NULL, MTX_DEF | MTX_RECURSE); diff --git a/sys/dev/usb2/input/ukbd2.c b/sys/dev/usb2/input/ukbd2.c index f3b01b0..487e560 100644 --- a/sys/dev/usb2/input/ukbd2.c +++ b/sys/dev/usb2/input/ukbd2.c @@ -625,9 +625,6 @@ ukbd_attach(device_t dev) usb2_error_t err; uint16_t n; - if (sc == NULL) { - return (ENOMEM); - } mtx_assert(&Giant, MA_OWNED); kbd_init_struct(kbd, UKBD_DRIVER_NAME, KB_OTHER, unit, 0, 0, 0); diff --git a/sys/dev/usb2/misc/udbp2.c b/sys/dev/usb2/misc/udbp2.c index 03e4d6c..97136e4 100644 --- a/sys/dev/usb2/misc/udbp2.c +++ b/sys/dev/usb2/misc/udbp2.c @@ -320,9 +320,6 @@ udbp_attach(device_t dev) struct udbp_softc *sc = device_get_softc(dev); int error; - if (sc == NULL) { - return (ENOMEM); - } device_set_usb2_desc(dev); snprintf(sc->sc_name, sizeof(sc->sc_name), @@ -476,9 +473,6 @@ udbp_bulk_read_complete(node_p node, hook_p hook, void *arg1, int arg2) struct mbuf *m; int error; - if (sc == NULL) { - return; - } mtx_lock(&sc->sc_mtx); m = sc->sc_bulk_in_buffer; diff --git a/sys/dev/usb2/misc/ufm2.c b/sys/dev/usb2/misc/ufm2.c index c37fdf65..5be828c 100644 --- a/sys/dev/usb2/misc/ufm2.c +++ b/sys/dev/usb2/misc/ufm2.c @@ -130,9 +130,6 @@ ufm_attach(device_t dev) struct ufm_softc *sc = device_get_softc(dev); int error; - if (sc == NULL) { - return (ENOMEM); - } sc->sc_udev = uaa->device; sc->sc_unit = device_get_unit(dev); diff --git a/sys/dev/usb2/serial/u3g2.c b/sys/dev/usb2/serial/u3g2.c index e97b4ff..472b74a 100644 --- a/sys/dev/usb2/serial/u3g2.c +++ b/sys/dev/usb2/serial/u3g2.c @@ -391,9 +391,6 @@ u3g_attach(device_t dev) DPRINTF("sc=%p\n", sc); - if (sc == NULL) { - return (ENOMEM); - } /* copy in USB config */ for (n = 0; n != U3G_N_TRANSFER; n++) u3g_config_tmp[n] = u3g_config[n]; diff --git a/sys/dev/usb2/serial/uark2.c b/sys/dev/usb2/serial/uark2.c index e0e0e60..1c6558c 100644 --- a/sys/dev/usb2/serial/uark2.c +++ b/sys/dev/usb2/serial/uark2.c @@ -209,9 +209,6 @@ uark_attach(device_t dev) int32_t error; uint8_t iface_index; - if (sc == NULL) { - return (ENOMEM); - } device_set_usb2_desc(dev); sc->sc_udev = uaa->device; diff --git a/sys/dev/usb2/serial/ubsa2.c b/sys/dev/usb2/serial/ubsa2.c index eccc22f..e9b149f 100644 --- a/sys/dev/usb2/serial/ubsa2.c +++ b/sys/dev/usb2/serial/ubsa2.c @@ -329,9 +329,6 @@ ubsa_attach(device_t dev) DPRINTF("sc=%p\n", sc); - if (sc == NULL) { - return (ENOMEM); - } device_set_usb2_desc(dev); sc->sc_udev = uaa->device; diff --git a/sys/dev/usb2/serial/ubser2.c b/sys/dev/usb2/serial/ubser2.c index 5447fc8..40366be 100644 --- a/sys/dev/usb2/serial/ubser2.c +++ b/sys/dev/usb2/serial/ubser2.c @@ -256,9 +256,6 @@ ubser_attach(device_t dev) uint8_t n; int error; - if (sc == NULL) { - return (ENOMEM); - } device_set_usb2_desc(dev); snprintf(sc->sc_name, sizeof(sc->sc_name), "%s", diff --git a/sys/dev/usb2/serial/uchcom2.c b/sys/dev/usb2/serial/uchcom2.c index 8aeef4e..c2c39e6 100644 --- a/sys/dev/usb2/serial/uchcom2.c +++ b/sys/dev/usb2/serial/uchcom2.c @@ -342,9 +342,6 @@ uchcom_attach(device_t dev) DPRINTFN(11, "\n"); - if (sc == NULL) { - return (ENOMEM); - } device_set_usb2_desc(dev); sc->sc_udev = uaa->device; diff --git a/sys/dev/usb2/serial/ucycom2.c b/sys/dev/usb2/serial/ucycom2.c index 3cb3b5b..7a82032 100644 --- a/sys/dev/usb2/serial/ucycom2.c +++ b/sys/dev/usb2/serial/ucycom2.c @@ -216,9 +216,6 @@ ucycom_attach(device_t dev) uint16_t urd_len; uint8_t iface_index; - if (sc == NULL) { - return (ENOMEM); - } sc->sc_udev = uaa->device; device_set_usb2_desc(dev); diff --git a/sys/dev/usb2/serial/ufoma2.c b/sys/dev/usb2/serial/ufoma2.c index 31efec1..9596ebd 100644 --- a/sys/dev/usb2/serial/ufoma2.c +++ b/sys/dev/usb2/serial/ufoma2.c @@ -407,9 +407,6 @@ ufoma_attach(device_t dev) uint8_t elements; int32_t error; - if (sc == NULL) { - return (ENOMEM); - } sc->sc_udev = uaa->device; sc->sc_dev = dev; sc->sc_unit = device_get_unit(dev); diff --git a/sys/dev/usb2/serial/uftdi2.c b/sys/dev/usb2/serial/uftdi2.c index db9d20a..663e702 100644 --- a/sys/dev/usb2/serial/uftdi2.c +++ b/sys/dev/usb2/serial/uftdi2.c @@ -286,9 +286,6 @@ uftdi_attach(device_t dev) struct uftdi_softc *sc = device_get_softc(dev); int error; - if (sc == NULL) { - return (ENOMEM); - } sc->sc_udev = uaa->device; sc->sc_dev = dev; sc->sc_unit = device_get_unit(dev); diff --git a/sys/dev/usb2/serial/ugensa2.c b/sys/dev/usb2/serial/ugensa2.c index 9476de0..b54a5f8 100644 --- a/sys/dev/usb2/serial/ugensa2.c +++ b/sys/dev/usb2/serial/ugensa2.c @@ -215,9 +215,6 @@ ugensa_attach(device_t dev) uint8_t iface_index; int x, cnt; - if (sc == NULL) - return (ENOMEM); - device_set_usb2_desc(dev); mtx_init(&sc->sc_mtx, "ugensa", NULL, MTX_DEF); diff --git a/sys/dev/usb2/serial/uipaq2.c b/sys/dev/usb2/serial/uipaq2.c index bfcdf22..e80b62b 100644 --- a/sys/dev/usb2/serial/uipaq2.c +++ b/sys/dev/usb2/serial/uipaq2.c @@ -1129,9 +1129,6 @@ uipaq_attach(device_t dev) uint8_t iface_index; uint8_t i; - if (sc == NULL) { - return (ENOMEM); - } sc->sc_udev = uaa->device; device_set_usb2_desc(dev); diff --git a/sys/dev/usb2/serial/umct2.c b/sys/dev/usb2/serial/umct2.c index 23aea40..9395f0b 100644 --- a/sys/dev/usb2/serial/umct2.c +++ b/sys/dev/usb2/serial/umct2.c @@ -273,9 +273,6 @@ umct_attach(device_t dev) uint16_t maxp; uint8_t iface_index; - if (sc == NULL) { - return (ENOMEM); - } sc->sc_udev = uaa->device; sc->sc_unit = device_get_unit(dev); diff --git a/sys/dev/usb2/serial/umodem2.c b/sys/dev/usb2/serial/umodem2.c index 00e3429..86d2326 100644 --- a/sys/dev/usb2/serial/umodem2.c +++ b/sys/dev/usb2/serial/umodem2.c @@ -322,9 +322,6 @@ umodem_attach(device_t dev) uint8_t i; int error; - if (sc == NULL) { - return (ENOMEM); - } device_set_usb2_desc(dev); sc->sc_ctrl_iface_no = uaa->info.bIfaceNum; diff --git a/sys/dev/usb2/serial/umoscom2.c b/sys/dev/usb2/serial/umoscom2.c index 9a8a47d..19be5b2 100644 --- a/sys/dev/usb2/serial/umoscom2.c +++ b/sys/dev/usb2/serial/umoscom2.c @@ -335,9 +335,6 @@ umoscom_attach(device_t dev) int error; uint8_t iface_index; - if (sc == NULL) { - return (ENOMEM); - } sc->sc_udev = uaa->device; sc->sc_mcr = 0x08; /* enable interrupts */ diff --git a/sys/dev/usb2/serial/uplcom2.c b/sys/dev/usb2/serial/uplcom2.c index 8b70cbc..ddc0a1f 100644 --- a/sys/dev/usb2/serial/uplcom2.c +++ b/sys/dev/usb2/serial/uplcom2.c @@ -371,9 +371,6 @@ uplcom_attach(device_t dev) DPRINTFN(11, "\n"); - if (sc == NULL) { - return (ENOMEM); - } device_set_usb2_desc(dev); DPRINTF("sc = %p\n", sc); diff --git a/sys/dev/usb2/serial/uvisor2.c b/sys/dev/usb2/serial/uvisor2.c index 6bd972f..468751e 100644 --- a/sys/dev/usb2/serial/uvisor2.c +++ b/sys/dev/usb2/serial/uvisor2.c @@ -321,9 +321,6 @@ uvisor_attach(device_t dev) DPRINTF("sc=%p\n", sc); bcopy(uvisor_config, uvisor_config_copy, sizeof(uvisor_config_copy)); - if (sc == NULL) { - return (ENOMEM); - } device_set_usb2_desc(dev); sc->sc_udev = uaa->device; diff --git a/sys/dev/usb2/serial/uvscom2.c b/sys/dev/usb2/serial/uvscom2.c index 30fd016..05e886e 100644 --- a/sys/dev/usb2/serial/uvscom2.c +++ b/sys/dev/usb2/serial/uvscom2.c @@ -315,9 +315,6 @@ uvscom_attach(device_t dev) struct uvscom_softc *sc = device_get_softc(dev); int error; - if (sc == NULL) { - return (ENOMEM); - } device_set_usb2_desc(dev); sc->sc_udev = uaa->device; diff --git a/sys/dev/usb2/sound/uaudio2.c b/sys/dev/usb2/sound/uaudio2.c index 1302106..cf4c160 100644 --- a/sys/dev/usb2/sound/uaudio2.c +++ b/sys/dev/usb2/sound/uaudio2.c @@ -562,9 +562,6 @@ uaudio_attach(device_t dev) struct usb2_interface_descriptor *id; device_t child; - if (sc == NULL) { - return (ENOMEM); - } sc->sc_play_chan.priv_sc = sc; sc->sc_rec_chan.priv_sc = sc; sc->sc_udev = uaa->device; diff --git a/sys/dev/usb2/storage/ata-usb2.c b/sys/dev/usb2/storage/ata-usb2.c index f72ac9f..430e59b 100644 --- a/sys/dev/usb2/storage/ata-usb2.c +++ b/sys/dev/usb2/storage/ata-usb2.c @@ -328,9 +328,6 @@ atausb2_attach(device_t dev) uint8_t has_intr; int err; - if (sc == NULL) { - return (ENOMEM); - } device_set_usb2_desc(dev); sc->dev = dev; diff --git a/sys/dev/usb2/storage/umass2.c b/sys/dev/usb2/storage/umass2.c index dd5d77b..1674f74 100644 --- a/sys/dev/usb2/storage/umass2.c +++ b/sys/dev/usb2/storage/umass2.c @@ -1444,9 +1444,6 @@ umass_attach(device_t dev) struct usb2_interface_descriptor *id; int32_t err; - if (sc == NULL) { - return (ENOMEM); - } if (device_get_unit(dev) >= UMASS_MAXUNIT) { device_printf(dev, "Maxunit(%u) limit reached!\n", UMASS_MAXUNIT); diff --git a/sys/dev/usb2/storage/urio2.c b/sys/dev/usb2/storage/urio2.c index ff4d819..f5b6315 100644 --- a/sys/dev/usb2/storage/urio2.c +++ b/sys/dev/usb2/storage/urio2.c @@ -212,9 +212,6 @@ urio_attach(device_t dev) struct urio_softc *sc = device_get_softc(dev); int error; - if (sc == NULL) { - return (ENOMEM); - } device_set_usb2_desc(dev); sc->sc_udev = uaa->device; diff --git a/sys/dev/usb2/storage/ustorage2_fs.c b/sys/dev/usb2/storage/ustorage2_fs.c index 6c606d5..78b0592 100644 --- a/sys/dev/usb2/storage/ustorage2_fs.c +++ b/sys/dev/usb2/storage/ustorage2_fs.c @@ -318,9 +318,6 @@ ustorage_fs_attach(device_t dev) struct usb2_interface_descriptor *id; int err; - if (sc == NULL) { - return (ENOMEM); - } /* * NOTE: the softc struct is bzero-ed in device_set_driver. * We can safely call ustorage_fs_detach without specifically diff --git a/sys/dev/usb2/wlan/if_rum2.c b/sys/dev/usb2/wlan/if_rum2.c index b11d614..df67061 100644 --- a/sys/dev/usb2/wlan/if_rum2.c +++ b/sys/dev/usb2/wlan/if_rum2.c @@ -461,9 +461,6 @@ rum_attach(device_t dev) int error; uint8_t iface_index; - if (sc == NULL) { - return (ENOMEM); - } device_set_usb2_desc(dev); mtx_init(&sc->sc_mtx, "rum lock", MTX_NETWORK_LOCK, diff --git a/sys/dev/usb2/wlan/if_ural2.c b/sys/dev/usb2/wlan/if_ural2.c index 0cb7bdd..2a66ce0 100644 --- a/sys/dev/usb2/wlan/if_ural2.c +++ b/sys/dev/usb2/wlan/if_ural2.c @@ -453,9 +453,6 @@ ural_attach(device_t dev) int error; uint8_t iface_index; - if (sc == NULL) { - return (ENOMEM); - } device_set_usb2_desc(dev); mtx_init(&sc->sc_mtx, "ural lock", MTX_NETWORK_LOCK, diff --git a/sys/dev/usb2/wlan/if_zyd2.c b/sys/dev/usb2/wlan/if_zyd2.c index 281035d..5b61f00 100644 --- a/sys/dev/usb2/wlan/if_zyd2.c +++ b/sys/dev/usb2/wlan/if_zyd2.c @@ -1069,9 +1069,6 @@ zyd_attach(device_t dev) int error; uint8_t iface_index; - if (sc == NULL) { - return (ENOMEM); - } if (uaa->info.bcdDevice < 0x4330) { device_printf(dev, "device version mismatch: 0x%X " "(only >= 43.30 supported)\n", |