diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2022-05-19 17:08:00 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-05-23 13:42:34 +0300 |
commit | 0097e86c8ec5a68f20bc1ae19f5c21fb0e751f83 (patch) | |
tree | 5c5d080db7abe8ac286979f65586113ea1b8c95a /drivers/net | |
parent | 682a8c633fc32933a73fd0379c62d37d1346055d (diff) | |
download | linux-0097e86c8ec5a68f20bc1ae19f5c21fb0e751f83.tar.xz |
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: c4f033d9e03e ("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>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/mediatek/mtk_ppe_offload.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mediatek/mtk_ppe_offload.c b/drivers/net/ethernet/mediatek/mtk_ppe_offload.c index c9353071f96a..90e7dfd011c9 100644 --- a/drivers/net/ethernet/mediatek/mtk_ppe_offload.c +++ b/drivers/net/ethernet/mediatek/mtk_ppe_offload.c @@ -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(ð->flow_table, &entry->node, |