diff options
Diffstat (limited to 'sys/dev/vnic/nicvf_main.c')
-rw-r--r-- | sys/dev/vnic/nicvf_main.c | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/sys/dev/vnic/nicvf_main.c b/sys/dev/vnic/nicvf_main.c index f5cf99ef0ce4..dd44e420c78f 100644 --- a/sys/dev/vnic/nicvf_main.c +++ b/sys/dev/vnic/nicvf_main.c @@ -139,7 +139,7 @@ static void nicvf_config_cpi(struct nicvf *); static int nicvf_rss_init(struct nicvf *); static int nicvf_init_resources(struct nicvf *); -static int nicvf_setup_ifnet(struct nicvf *); +static void nicvf_setup_ifnet(struct nicvf *); static int nicvf_setup_ifmedia(struct nicvf *); static void nicvf_hw_addr_random(uint8_t *); @@ -247,11 +247,7 @@ nicvf_attach(device_t dev) nicvf_rss_init(nic); NICVF_CORE_UNLOCK(nic); - err = nicvf_setup_ifnet(nic); - if (err != 0) { - device_printf(dev, "Could not set-up ifnet\n"); - goto err_release_intr; - } + nicvf_setup_ifnet(nic); err = nicvf_setup_ifmedia(nic); if (err != 0) { @@ -329,17 +325,12 @@ nicvf_hw_addr_random(uint8_t *hwaddr) memcpy(hwaddr, addr, ETHER_ADDR_LEN); } -static int +static void nicvf_setup_ifnet(struct nicvf *nic) { if_t ifp; ifp = if_alloc(IFT_ETHER); - if (ifp == NULL) { - device_printf(nic->dev, "Could not allocate ifnet structure\n"); - return (ENOMEM); - } - nic->ifp = ifp; if_setsoftc(ifp, nic); @@ -379,8 +370,6 @@ nicvf_setup_ifnet(struct nicvf *nic) if (nic->hw_tso) if_sethwassistbits(ifp, (CSUM_TSO), 0); if_setcapenable(ifp, if_getcapabilities(ifp)); - - return (0); } static int |