@@ -712,7 +712,7 @@ static uint32_t iflib_txq_can_drain(struct ifmp_ring *);
712712static void iflib_altq_if_start (if_t ifp );
713713static int iflib_altq_if_transmit (if_t ifp , struct mbuf * m );
714714#endif
715- static int iflib_register (if_ctx_t );
715+ static void iflib_register (if_ctx_t );
716716static void iflib_deregister (if_ctx_t );
717717static void iflib_unregister_vlan_handlers (if_ctx_t ctx );
718718static uint16_t iflib_get_mbuf_size_for (unsigned int size );
@@ -5136,10 +5136,7 @@ iflib_device_register(device_t dev, void *sc, if_shared_ctx_t sctx, if_ctx_t *ct
51365136 ctx -> ifc_dev = dev ;
51375137 ctx -> ifc_softc = sc ;
51385138
5139- if ((err = iflib_register (ctx )) != 0 ) {
5140- device_printf (dev , "iflib_register failed %d\n" , err );
5141- goto fail_ctx_free ;
5142- }
5139+ iflib_register (ctx );
51435140 iflib_add_device_sysctl_pre (ctx );
51445141
51455142 scctx = & ctx -> ifc_softc_ctx ;
@@ -5387,7 +5384,6 @@ iflib_device_register(device_t dev, void *sc, if_shared_ctx_t sctx, if_ctx_t *ct
53875384 CTX_UNLOCK (ctx );
53885385 IFNET_WUNLOCK ();
53895386 iflib_deregister (ctx );
5390- fail_ctx_free :
53915387 device_set_softc (ctx -> ifc_dev , NULL );
53925388 if (ctx -> ifc_flags & IFC_SC_ALLOCATED )
53935389 free (ctx -> ifc_softc , M_IFLIB );
@@ -5685,7 +5681,7 @@ _iflib_pre_assert(if_softc_ctx_t scctx)
56855681 MPASS (scctx -> isc_txrx -> ift_rxd_flush );
56865682}
56875683
5688- static int
5684+ static void
56895685iflib_register (if_ctx_t ctx )
56905686{
56915687 if_shared_ctx_t sctx = ctx -> ifc_sctx ;
@@ -5731,7 +5727,6 @@ iflib_register(if_ctx_t ctx)
57315727 ifmedia_init (ctx -> ifc_mediap , IFM_IMASK ,
57325728 iflib_media_change , iflib_media_status );
57335729 }
5734- return (0 );
57355730}
57365731
57375732static void
0 commit comments