diff mbox series

[net-next] net: libwx: fix an error code in wx_alloc_page_pool()

Message ID Y+T4aoefc1XWvGYb@kili (mailing list archive)
State Accepted
Commit 183514f7c569c462da45cc92a3843b666d588413
Delegated to: Netdev Maintainers
Headers show
Series [net-next] net: libwx: fix an error code in wx_alloc_page_pool() | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix success Link
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers warning 1 maintainers not CCed: yang.lee@linux.alibaba.com
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 9 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Dan Carpenter Feb. 9, 2023, 1:43 p.m. UTC
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(-)

Comments

patchwork-bot+netdevbpf@kernel.org Feb. 11, 2023, 3:40 a.m. UTC | #1
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!
diff mbox series

Patch

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;