Commit 0097e86c authored by Dan Carpenter's avatar Dan Carpenter Committed by David S. Miller

net: ethernet: mtk_eth_soc: fix error code in mtk_flow_offload_replace()

Preserve the error code from mtk_foe_entry_commit().  Do not return
success.

Fixes: c4f033d9 ("net: ethernet: mtk_eth_soc: rework hardware flow table management")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 682a8c63
......@@ -435,7 +435,8 @@ mtk_flow_offload_replace(struct mtk_eth *eth, struct flow_cls_offload *f)
memcpy(&entry->data, &foe, sizeof(entry->data));
entry->wed_index = wed_index;
if (mtk_foe_entry_commit(eth->ppe, entry) < 0)
err = mtk_foe_entry_commit(eth->ppe, entry);
if (err < 0)
goto free;
err = rhashtable_insert_fast(&eth->flow_table, &entry->node,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment