提交 4a6a1385 编写于 作者: J Jose Abreu 提交者: David S. Miller

net: stmmac: tc: Do not return a fragment entry

Do not try to return a fragment entry from TC list. Otherwise we may not
clean properly allocated entries.
Signed-off-by: NJose Abreu <joabreu@synopsys.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 e8df7e8c
...@@ -37,7 +37,7 @@ static struct stmmac_tc_entry *tc_find_entry(struct stmmac_priv *priv, ...@@ -37,7 +37,7 @@ static struct stmmac_tc_entry *tc_find_entry(struct stmmac_priv *priv,
entry = &priv->tc_entries[i]; entry = &priv->tc_entries[i];
if (!entry->in_use && !first && free) if (!entry->in_use && !first && free)
first = entry; first = entry;
if (entry->handle == loc && !free) if ((entry->handle == loc) && !free && !entry->is_frag)
dup = entry; dup = entry;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册