aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/sk
diff options
context:
space:
mode:
authorRuslan Ermilov <ru@FreeBSD.org>2005-09-16 11:11:51 +0000
committerRuslan Ermilov <ru@FreeBSD.org>2005-09-16 11:11:51 +0000
commit3badacee8c62f420e7519685b3700d5741d67ded (patch)
treeeea8401041be885ba31c07333f6e0206b9d04ab0 /sys/dev/sk
parentc4c6f08f6878d257f78ac12816d7f64b211f8f64 (diff)
Notes
Diffstat (limited to 'sys/dev/sk')
-rw-r--r--sys/dev/sk/if_sk.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/dev/sk/if_sk.c b/sys/dev/sk/if_sk.c
index b0d937a11316..6ae2352792e2 100644
--- a/sys/dev/sk/if_sk.c
+++ b/sys/dev/sk/if_sk.c
@@ -1534,7 +1534,6 @@ sk_attach(dev)
sc->sk_unit, sc_if->sk_phytype);
error = ENODEV;
SK_UNLOCK(sc);
- if_free(ifp);
goto fail;
}
@@ -1565,7 +1564,6 @@ sk_attach(dev)
sk_ifmedia_upd, sk_ifmedia_sts)) {
printf("skc%d: no PHY found!\n", sc_if->sk_unit);
ether_ifdetach(ifp);
- if_free(ifp);
error = ENXIO;
goto fail;
}
@@ -1922,9 +1920,10 @@ sk_detach(dev)
/* Can't hold locks while calling detach */
SK_IF_UNLOCK(sc_if);
ether_ifdetach(ifp);
- if_free(ifp);
SK_IF_LOCK(sc_if);
}
+ if (ifp)
+ if_free(ifp);
/*
* We're generally called from skc_detach() which is using
* device_delete_child() to get to here. It's already trashed