diff options
author | Dan Carpenter <error27@gmail.com> | 2023-02-09 16:43:06 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2023-02-10 19:37:13 -0800 |
commit | 183514f7c569c462da45cc92a3843b666d588413 (patch) | |
tree | 812f73fb9271a97b2acf9e3995860a92aaa47a52 /drivers/net/ethernet/wangxun/libwx/wx_lib.c | |
parent | f99f22e02f298083763b78a58cf82903d5e2d272 (diff) |
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 <error27@gmail.com>
Link: https://lore.kernel.org/r/Y+T4aoefc1XWvGYb@kili
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/wangxun/libwx/wx_lib.c')
-rw-r--r-- | drivers/net/ethernet/wangxun/libwx/wx_lib.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/wangxun/libwx/wx_lib.c b/drivers/net/ethernet/wangxun/libwx/wx_lib.c index 2ee286b2b177..eb89a274083e 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; |