netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] net: libwx: fix an error code in wx_alloc_page_pool()
@ 2023-02-09 13:43 Dan Carpenter
  2023-02-11  3:40 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2023-02-09 13:43 UTC (permalink / raw)
  To: Jiawen Wu
  Cc: Mengyuan Lou, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, netdev, kernel-janitors

This function always returns success.  We need to preserve the error
code before setting rx_ring->page_pool = NULL.

Fixes: 850b971110b2 ("net: libwx: Allocate Rx and Tx resources")
Signed-off-by: Dan Carpenter <error27@gmail.com>
---
Applies to net-next.

 drivers/net/ethernet/wangxun/libwx/wx_lib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/wangxun/libwx/wx_lib.c b/drivers/net/ethernet/wangxun/libwx/wx_lib.c
index 57e1871ea0c6..ca92fe19a663 100644
--- a/drivers/net/ethernet/wangxun/libwx/wx_lib.c
+++ b/drivers/net/ethernet/wangxun/libwx/wx_lib.c
@@ -1745,8 +1745,8 @@ static int wx_alloc_page_pool(struct wx_ring *rx_ring)
 
 	rx_ring->page_pool = page_pool_create(&pp_params);
 	if (IS_ERR(rx_ring->page_pool)) {
-		rx_ring->page_pool = NULL;
 		ret = PTR_ERR(rx_ring->page_pool);
+		rx_ring->page_pool = NULL;
 	}
 
 	return ret;
-- 
2.35.1


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

* Re: [PATCH net-next] net: libwx: fix an error code in wx_alloc_page_pool()
  2023-02-09 13:43 [PATCH net-next] net: libwx: fix an error code in wx_alloc_page_pool() Dan Carpenter
@ 2023-02-11  3:40 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-02-11  3:40 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: jiawenwu, mengyuanlou, davem, edumazet, kuba, pabeni, netdev,
	kernel-janitors

Hello:

This patch was applied to netdev/net-next.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Thu, 9 Feb 2023 16:43:06 +0300 you wrote:
> This function always returns success.  We need to preserve the error
> code before setting rx_ring->page_pool = NULL.
> 
> Fixes: 850b971110b2 ("net: libwx: Allocate Rx and Tx resources")
> Signed-off-by: Dan Carpenter <error27@gmail.com>
> ---
> Applies to net-next.
> 
> [...]

Here is the summary with links:
  - [net-next] net: libwx: fix an error code in wx_alloc_page_pool()
    https://git.kernel.org/netdev/net-next/c/183514f7c569

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] 2+ messages in thread

end of thread, other threads:[~2023-02-11  3:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-09 13:43 [PATCH net-next] net: libwx: fix an error code in wx_alloc_page_pool() Dan Carpenter
2023-02-11  3:40 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).