mirror of
https://github.com/torvalds/linux.git
synced 2026-05-23 06:31:58 +02:00
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: 850b971110 ("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>
This commit is contained in:
parent
f99f22e02f
commit
183514f7c5
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user