Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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: 73f37a7e1993 ("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>

authored by

Dan Carpenter and committed by
Jakub Kicinski
c4bdef8b 17f1b771

+1 -1
+1 -1
drivers/net/ethernet/huawei/hinic3/hinic3_rx.c
··· 414 414 pp_params.dma_dir = DMA_FROM_DEVICE; 415 415 pp_params.max_len = PAGE_SIZE; 416 416 rqres->page_pool = page_pool_create(&pp_params); 417 - if (!rqres->page_pool) { 417 + if (IS_ERR(rqres->page_pool)) { 418 418 netdev_err(netdev, "Failed to create rxq%d page pool\n", 419 419 idx); 420 420 goto err_free_cqe;