summaryrefslogtreecommitdiffstats
path: root/sys/dev/my
diff options
context:
space:
mode:
authorjulian <julian@FreeBSD.org>2002-05-02 15:58:04 +0000
committerjulian <julian@FreeBSD.org>2002-05-02 15:58:04 +0000
commit7661600390e4659d8ada8ee6821c6557113e0768 (patch)
tree09b99842c351635aca28c4990c1f6219173a8cba /sys/dev/my
parent80604a408d5c827d5520c1c3e1bc427469db1a8c (diff)
downloadFreeBSD-src-7661600390e4659d8ada8ee6821c6557113e0768.zip
FreeBSD-src-7661600390e4659d8ada8ee6821c6557113e0768.tar.gz
Add missing UNLOCKs
Submitted by: dirkx@covalent.net
Diffstat (limited to 'sys/dev/my')
-rw-r--r--sys/dev/my/if_my.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/dev/my/if_my.c b/sys/dev/my/if_my.c
index d69e815..70e8c34 100644
--- a/sys/dev/my/if_my.c
+++ b/sys/dev/my/if_my.c
@@ -1181,6 +1181,7 @@ my_newbuf(struct my_softc * sc, struct my_chain_onefrag * c)
if (m_new == NULL) {
printf("my%d: no memory for rx list -- packet dropped!\n",
sc->my_unit);
+ MY_UNLOCK(sc);
return (ENOBUFS);
}
MCLGET(m_new, M_DONTWAIT);
@@ -1188,6 +1189,7 @@ my_newbuf(struct my_softc * sc, struct my_chain_onefrag * c)
printf("my%d: no memory for rx list -- packet dropped!\n",
sc->my_unit);
m_freem(m_new);
+ MY_UNLOCK(sc);
return (ENOBUFS);
}
c->my_mbuf = m_new;
@@ -1296,8 +1298,10 @@ my_txeof(struct my_softc * sc)
ifp = &sc->arpcom.ac_if;
/* Clear the timeout timer. */
ifp->if_timer = 0;
- if (sc->my_cdata.my_tx_head == NULL)
+ if (sc->my_cdata.my_tx_head == NULL) {
+ MY_UNLOCK(sc);
return;
+ }
/*
* Go through our tx list and free mbufs for those frames that have
* been transmitted.
@@ -1450,6 +1454,7 @@ my_encap(struct my_softc * sc, struct my_chain * c, struct mbuf * m_head)
MGETHDR(m_new, M_DONTWAIT, MT_DATA);
if (m_new == NULL) {
printf("my%d: no memory for tx list", sc->my_unit);
+ MY_UNLOCK(sc);
return (1);
}
if (m_head->m_pkthdr.len > MHLEN) {
@@ -1457,6 +1462,7 @@ my_encap(struct my_softc * sc, struct my_chain * c, struct mbuf * m_head)
if (!(m_new->m_flags & M_EXT)) {
m_freem(m_new);
printf("my%d: no memory for tx list", sc->my_unit);
+ MY_UNLOCK(sc);
return (1);
}
}
@@ -1871,3 +1877,5 @@ my_shutdown(device_t dev)
my_stop(sc);
return;
}
+
+
OpenPOWER on IntegriCloud