net: libwx: fix an error code in wx_alloc_page_pool()
Subsystems (4)
PATCH 1/1 net: libwx: fix an error code in wx_alloc_page_pool()
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 <[email protected]>
---
Applies to net-next.
drivers/net/ethernet/wangxun/libwx/wx_lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/wangxun/libwx/wx_lib.c +1 -1
@@ -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;
Signature · 1 line
2.35.1
This patch was applied to netdev/net-next.git (master) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (master) by Jakub Kicinski <[email protected]>:
Quoted 9 lines · 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 <[email protected]>---
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!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html