mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-12-27 11:06:41 -05:00
hinic3: Fix NULL vs IS_ERR() check in hinic3_alloc_rxqs_res()
The page_pool_create() function never returns NULL, it returns
error pointers. Update the check to match.
Fixes: 73f37a7e19 ("hinic3: Queue pair resource initialization")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Vadim Fedorenko <vadim.fedorenko@linux.dev>
Link: https://patch.msgid.link/aMvUywhgbmO1kH3Z@stanley.mountain
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
committed by
Jakub Kicinski
parent
17f1b7711e
commit
c4bdef8b3d
@@ -414,7 +414,7 @@ int hinic3_alloc_rxqs_res(struct net_device *netdev, u16 num_rq,
|
||||
pp_params.dma_dir = DMA_FROM_DEVICE;
|
||||
pp_params.max_len = PAGE_SIZE;
|
||||
rqres->page_pool = page_pool_create(&pp_params);
|
||||
if (!rqres->page_pool) {
|
||||
if (IS_ERR(rqres->page_pool)) {
|
||||
netdev_err(netdev, "Failed to create rxq%d page pool\n",
|
||||
idx);
|
||||
goto err_free_cqe;
|
||||
|
||||
Reference in New Issue
Block a user