net: libwx: fix an error code in wx_alloc_page_pool()
authorDan Carpenter <error27@gmail.com>
Thu, 9 Feb 2023 13:43:06 +0000 (16:43 +0300)
committerJakub Kicinski <kuba@kernel.org>
Sat, 11 Feb 2023 03:37:13 +0000 (19:37 -0800)
commit183514f7c569c462da45cc92a3843b666d588413
tree812f73fb9271a97b2acf9e3995860a92aaa47a52
parentf99f22e02f298083763b78a58cf82903d5e2d272
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>
drivers/net/ethernet/wangxun/libwx/wx_lib.c