diff options
| author | Zhenlei Huang <zlei@FreeBSD.org> | 2024-06-28 10:16:29 +0000 |
|---|---|---|
| committer | Zhenlei Huang <zlei@FreeBSD.org> | 2024-07-12 12:03:37 +0000 |
| commit | 6b1f530935c5f84ec65dad87b7c20c6b7a72a6d3 (patch) | |
| tree | 788b6c0005f7d3de8e6142ba14174b3dd84a048b /sys/dev/bxe | |
| parent | 72f8b18b8d93bee8f6ca6ed0dfa160db18424807 (diff) | |
Diffstat (limited to 'sys/dev/bxe')
| -rw-r--r-- | sys/dev/bxe/bxe.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/sys/dev/bxe/bxe.c b/sys/dev/bxe/bxe.c index 8524deeb354e..05bc22c0c981 100644 --- a/sys/dev/bxe/bxe.c +++ b/sys/dev/bxe/bxe.c @@ -12965,7 +12965,7 @@ bxe_init(void *xsc) BXE_CORE_UNLOCK(sc); } -static int +static void bxe_init_ifnet(struct bxe_softc *sc) { if_t ifp; @@ -12985,10 +12985,7 @@ bxe_init_ifnet(struct bxe_softc *sc) BLOGI(sc, "IFMEDIA flags : %x\n", sc->ifmedia.ifm_media); /* allocate the ifnet structure */ - if ((ifp = if_gethandle(IFT_ETHER)) == NULL) { - BLOGE(sc, "Interface allocation failed!\n"); - return (ENXIO); - } + ifp = if_gethandle(IFT_ETHER); if_setsoftc(ifp, sc); if_initname(ifp, device_get_name(sc->dev), device_get_unit(sc->dev)); @@ -13034,8 +13031,6 @@ bxe_init_ifnet(struct bxe_softc *sc) /* Attach driver debugnet methods. */ DEBUGNET_SET(ifp, bxe); - - return (0); } static void @@ -16261,12 +16256,7 @@ bxe_attach(device_t dev) bxe_get_phy_info(sc); /* initialize the FreeBSD ifnet interface */ - if (bxe_init_ifnet(sc) != 0) { - bxe_release_mutexes(sc); - bxe_deallocate_bars(sc); - pci_disable_busmaster(dev); - return (ENXIO); - } + bxe_init_ifnet(sc); if (bxe_add_cdev(sc) != 0) { if (sc->ifp != NULL) { |
