summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpdeuskar <pdeuskar@FreeBSD.org>2006-09-11 20:59:01 +0000
committerpdeuskar <pdeuskar@FreeBSD.org>2006-09-11 20:59:01 +0000
commit4c318f22c8649960aad848db8c73e68e8a7981f4 (patch)
tree8daa43d9cbabd8eae9637e654b6a2027b25df89d
parent375fa0aa41b95aca6b081230c5f17725b9dcc893 (diff)
downloadFreeBSD-src-4c318f22c8649960aad848db8c73e68e8a7981f4.zip
FreeBSD-src-4c318f22c8649960aad848db8c73e68e8a7981f4.tar.gz
Fix issues found by Coverity (223392, 223393) due to TSO additions
Submitted by: Matthew Jacob
-rw-r--r--sys/dev/em/if_em.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/em/if_em.c b/sys/dev/em/if_em.c
index a948469..7831ba2 100644
--- a/sys/dev/em/if_em.c
+++ b/sys/dev/em/if_em.c
@@ -1516,8 +1516,10 @@ em_encap(struct adapter *adapter, struct mbuf **m_headp)
*/
if (do_tso && (m_head->m_len <= M_TSO_LEN)) {
m_head = m_pullup(m_head, M_TSO_LEN + 4);
- if (m_head == NULL)
+ *m_headp = m_head;
+ if (m_head == NULL) {
return (ENOBUFS);
+ }
}
/*
@@ -1578,7 +1580,7 @@ em_encap(struct adapter *adapter, struct mbuf **m_headp)
/* Do hardware assists */
m_head = *m_headp;
- if ( ifp->if_hwassist > 0) {
+ if (ifp->if_hwassist > 0) {
if (em_tso_setup(adapter, m_head, &txd_upper, &txd_lower)) {
/* we need to make a final sentinel transmit desc */
tso_desc = TRUE;
OpenPOWER on IntegriCloud