diff options
Diffstat (limited to 'sys/dev/ti/if_ti.c')
-rw-r--r-- | sys/dev/ti/if_ti.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/ti/if_ti.c b/sys/dev/ti/if_ti.c index bef01ae..a6126df 100644 --- a/sys/dev/ti/if_ti.c +++ b/sys/dev/ti/if_ti.c @@ -2292,7 +2292,6 @@ ti_attach(dev) if (error) { printf("ti%d: couldn't set up irq\n", unit); ether_ifdetach(ifp); - if_free(ifp); goto fail; } @@ -2328,9 +2327,10 @@ ti_detach(dev) if (device_is_attached(dev)) { ti_stop(sc); ether_ifdetach(ifp); - if_free(ifp); bus_generic_detach(dev); } + if (ifp) + if_free(ifp); ifmedia_removeall(&sc->ifmedia); if (sc->ti_rdata) |