1 From: Dan Carpenter <dan.carpenter@oracle.com>
2 Date: Thu, 19 May 2022 17:08:00 +0300
3 Subject: [PATCH] net: ethernet: mtk_eth_soc: fix error code in
4 mtk_flow_offload_replace()
6 Preserve the error code from mtk_foe_entry_commit(). Do not return
9 Fixes: c4f033d9e03e ("net: ethernet: mtk_eth_soc: rework hardware flow table management")
10 Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
11 Signed-off-by: David S. Miller <davem@davemloft.net>
14 --- a/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
15 +++ b/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
16 @@ -434,7 +434,8 @@ mtk_flow_offload_replace(struct mtk_eth
17 memcpy(&entry->data, &foe, sizeof(entry->data));
18 entry->wed_index = wed_index;
20 - if (mtk_foe_entry_commit(eth->ppe, entry) < 0)
21 + err = mtk_foe_entry_commit(eth->ppe, entry);
25 err = rhashtable_insert_fast(ð->flow_table, &entry->node,