1
0
Fork 0
mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-01-23 08:35:19 -05:00

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: c4f033d9e0 ("net: ethernet: mtk_eth_soc: rework hardware flow table management")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Dan Carpenter 2022-05-19 17:08:00 +03:00 committed by David S. Miller
parent 682a8c633f
commit 0097e86c8e

View file

@ -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,