All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] net: ethernet: mtk_eth_soc: fix error code in mtk_flow_offload_replace()
@ 2022-05-19 14:08 ` Dan Carpenter
  0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2022-05-19 14:08 UTC (permalink / raw)
  To: Felix Fietkau
  Cc: John Crispin, Sean Wang, Mark Lee, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Matthias Brugger, netdev,
	linux-mediatek, kernel-janitors

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>
---
The original code used to preserve the error code.  I'm pretty sure
returning an error is the correct thing.  I guess please double check
this patch.

 drivers/net/ethernet/mediatek/mtk_ppe_offload.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/mediatek/mtk_ppe_offload.c b/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
index 1fe31058b0f2..a641a44323a9 100644
--- a/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
+++ b/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
@@ -434,7 +434,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,
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH net-next] net: ethernet: mtk_eth_soc: fix error code in mtk_flow_offload_replace()
@ 2022-05-19 14:08 ` Dan Carpenter
  0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2022-05-19 14:08 UTC (permalink / raw)
  To: Felix Fietkau
  Cc: John Crispin, Sean Wang, Mark Lee, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Matthias Brugger, netdev,
	linux-mediatek, kernel-janitors

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>
---
The original code used to preserve the error code.  I'm pretty sure
returning an error is the correct thing.  I guess please double check
this patch.

 drivers/net/ethernet/mediatek/mtk_ppe_offload.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/mediatek/mtk_ppe_offload.c b/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
index 1fe31058b0f2..a641a44323a9 100644
--- a/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
+++ b/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
@@ -434,7 +434,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,
-- 
2.35.1


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next] net: ethernet: mtk_eth_soc: fix error code in mtk_flow_offload_replace()
  2022-05-19 14:08 ` Dan Carpenter
@ 2022-05-23 10:50   ` patchwork-bot+netdevbpf
  -1 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-05-23 10:50 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: nbd, john, sean.wang, Mark-MC.Lee, davem, edumazet, kuba, pabeni,
	matthias.bgg, netdev, linux-mediatek, kernel-janitors

Hello:

This patch was applied to netdev/net-next.git (master)
by David S. Miller <davem@davemloft.net>:

On Thu, 19 May 2022 17:08:00 +0300 you wrote:
> 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>
> ---
> The original code used to preserve the error code.  I'm pretty sure
> returning an error is the correct thing.  I guess please double check
> this patch.
> 
> [...]

Here is the summary with links:
  - [net-next] net: ethernet: mtk_eth_soc: fix error code in mtk_flow_offload_replace()
    https://git.kernel.org/netdev/net-next/c/0097e86c8ec5

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next] net: ethernet: mtk_eth_soc: fix error code in mtk_flow_offload_replace()
@ 2022-05-23 10:50   ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-05-23 10:50 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: nbd, john, sean.wang, Mark-MC.Lee, davem, edumazet, kuba, pabeni,
	matthias.bgg, netdev, linux-mediatek, kernel-janitors

Hello:

This patch was applied to netdev/net-next.git (master)
by David S. Miller <davem@davemloft.net>:

On Thu, 19 May 2022 17:08:00 +0300 you wrote:
> 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>
> ---
> The original code used to preserve the error code.  I'm pretty sure
> returning an error is the correct thing.  I guess please double check
> this patch.
> 
> [...]

Here is the summary with links:
  - [net-next] net: ethernet: mtk_eth_soc: fix error code in mtk_flow_offload_replace()
    https://git.kernel.org/netdev/net-next/c/0097e86c8ec5

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-05-23 11:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-19 14:08 [PATCH net-next] net: ethernet: mtk_eth_soc: fix error code in mtk_flow_offload_replace() Dan Carpenter
2022-05-19 14:08 ` Dan Carpenter
2022-05-23 10:50 ` patchwork-bot+netdevbpf
2022-05-23 10:50   ` patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.