* [PATCH net-next] hinic3: Fix NULL vs IS_ERR() check in hinic3_alloc_rxqs_res()
@ 2025-09-18 9:45 Dan Carpenter
2025-09-18 12:57 ` Vadim Fedorenko
2025-09-19 14:30 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2025-09-18 9:45 UTC (permalink / raw)
To: Fan Gong
Cc: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Zhu Yikai, netdev, linux-kernel, kernel-janitors
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>
---
drivers/net/ethernet/huawei/hinic3/hinic3_rx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/huawei/hinic3/hinic3_rx.c b/drivers/net/ethernet/huawei/hinic3/hinic3_rx.c
index 6cfe3bdd8ee5..16c00c3bb1ed 100644
--- a/drivers/net/ethernet/huawei/hinic3/hinic3_rx.c
+++ b/drivers/net/ethernet/huawei/hinic3/hinic3_rx.c
@@ -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;
--
2.51.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH net-next] hinic3: Fix NULL vs IS_ERR() check in hinic3_alloc_rxqs_res()
2025-09-18 9:45 [PATCH net-next] hinic3: Fix NULL vs IS_ERR() check in hinic3_alloc_rxqs_res() Dan Carpenter
@ 2025-09-18 12:57 ` Vadim Fedorenko
2025-09-19 14:30 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Vadim Fedorenko @ 2025-09-18 12:57 UTC (permalink / raw)
To: Dan Carpenter, Fan Gong
Cc: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Zhu Yikai, netdev, linux-kernel, kernel-janitors
On 18/09/2025 10:45, Dan Carpenter wrote:
> 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>
> ---
> drivers/net/ethernet/huawei/hinic3/hinic3_rx.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/huawei/hinic3/hinic3_rx.c b/drivers/net/ethernet/huawei/hinic3/hinic3_rx.c
> index 6cfe3bdd8ee5..16c00c3bb1ed 100644
> --- a/drivers/net/ethernet/huawei/hinic3/hinic3_rx.c
> +++ b/drivers/net/ethernet/huawei/hinic3/hinic3_rx.c
> @@ -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;
Reviewed-by: Vadim Fedorenko <vadim.fedorenko@linux.dev>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH net-next] hinic3: Fix NULL vs IS_ERR() check in hinic3_alloc_rxqs_res()
2025-09-18 9:45 [PATCH net-next] hinic3: Fix NULL vs IS_ERR() check in hinic3_alloc_rxqs_res() Dan Carpenter
2025-09-18 12:57 ` Vadim Fedorenko
@ 2025-09-19 14:30 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-09-19 14:30 UTC (permalink / raw)
To: Dan Carpenter
Cc: gongfan1, andrew+netdev, davem, edumazet, kuba, pabeni, zhuyikai1,
netdev, linux-kernel, kernel-janitors
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Thu, 18 Sep 2025 12:45:47 +0300 you wrote:
> 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>
> ---
> drivers/net/ethernet/huawei/hinic3/hinic3_rx.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Here is the summary with links:
- [net-next] hinic3: Fix NULL vs IS_ERR() check in hinic3_alloc_rxqs_res()
https://git.kernel.org/netdev/net-next/c/c4bdef8b3d2a
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-09-19 14:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-18 9:45 [PATCH net-next] hinic3: Fix NULL vs IS_ERR() check in hinic3_alloc_rxqs_res() Dan Carpenter
2025-09-18 12:57 ` Vadim Fedorenko
2025-09-19 14:30 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).