summaryrefslogtreecommitdiffstats
path: root/sys/pci/if_wb.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/pci/if_wb.c')
-rw-r--r--sys/pci/if_wb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/pci/if_wb.c b/sys/pci/if_wb.c
index a6a677f..205e007 100644
--- a/sys/pci/if_wb.c
+++ b/sys/pci/if_wb.c
@@ -885,7 +885,6 @@ wb_attach(dev)
if (error) {
device_printf(dev, "couldn't set up irq\n");
ether_ifdetach(ifp);
- if_free(ifp);
goto fail;
}
@@ -922,8 +921,9 @@ wb_detach(dev)
if (device_is_attached(dev)) {
wb_stop(sc);
ether_ifdetach(ifp);
- if_free(ifp);
}
+ if (ifp)
+ if_free(ifp);
if (sc->wb_miibus)
device_delete_child(dev, sc->wb_miibus);
bus_generic_detach(dev);
OpenPOWER on IntegriCloud