summaryrefslogtreecommitdiffstats
path: root/sys/pci/if_xl.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/pci/if_xl.c')
-rw-r--r--sys/pci/if_xl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/pci/if_xl.c b/sys/pci/if_xl.c
index b4f1f86..520f668 100644
--- a/sys/pci/if_xl.c
+++ b/sys/pci/if_xl.c
@@ -1608,7 +1608,6 @@ done:
if (error) {
device_printf(dev, "couldn't set up irq\n");
ether_ifdetach(ifp);
- if_free(ifp);
goto fail;
}
@@ -1708,8 +1707,9 @@ xl_detach(device_t dev)
taskqueue_drain(taskqueue_swi, &sc->xl_task);
callout_drain(&sc->xl_stat_callout);
ether_ifdetach(ifp);
- if_free(ifp);
}
+ if (ifp)
+ if_free(ifp);
if (sc->xl_miibus)
device_delete_child(dev, sc->xl_miibus);
bus_generic_detach(dev);
OpenPOWER on IntegriCloud