From a21ff306d87f6b73cc8597be13b09f07366acb82 Mon Sep 17 00:00:00 2001 From: Prafulla Deuskar Date: Mon, 11 Sep 2006 20:59:01 +0000 Subject: [PATCH] Fix issues found by Coverity (223392, 223393) due to TSO additions Submitted by: Matthew Jacob --- sys/dev/em/if_em.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/dev/em/if_em.c b/sys/dev/em/if_em.c index a9484698e7f..7831ba205fc 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;