netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] cavium: Return negative value when pci_alloc_irq_vectors() fails
@ 2021-10-18  2:16 Zheyu Ma
  2021-10-18 13:00 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Zheyu Ma @ 2021-10-18  2:16 UTC (permalink / raw)
  To: sgoutham, davem, kuba; +Cc: linux-arm-kernel, netdev, linux-kernel, Zheyu Ma

During the process of driver probing, the probe function should return < 0
for failure, otherwise, the kernel will treat value > 0 as success.

Signed-off-by: Zheyu Ma <zheyuma97@gmail.com>
---
 drivers/net/ethernet/cavium/thunder/nic_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/cavium/thunder/nic_main.c b/drivers/net/ethernet/cavium/thunder/nic_main.c
index 691e1475d55e..0fbecd093fa1 100644
--- a/drivers/net/ethernet/cavium/thunder/nic_main.c
+++ b/drivers/net/ethernet/cavium/thunder/nic_main.c
@@ -1193,7 +1193,7 @@ static int nic_register_interrupts(struct nicpf *nic)
 		dev_err(&nic->pdev->dev,
 			"Request for #%d msix vectors failed, returned %d\n",
 			   nic->num_vec, ret);
-		return 1;
+		return ret;
 	}
 
 	/* Register mailbox interrupt handler */
-- 
2.17.6


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] cavium: Return negative value when pci_alloc_irq_vectors() fails
  2021-10-18  2:16 [PATCH] cavium: Return negative value when pci_alloc_irq_vectors() fails Zheyu Ma
@ 2021-10-18 13:00 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-10-18 13:00 UTC (permalink / raw)
  To: Zheyu Ma; +Cc: sgoutham, davem, kuba, linux-arm-kernel, netdev, linux-kernel

Hello:

This patch was applied to netdev/net.git (master)
by David S. Miller <davem@davemloft.net>:

On Mon, 18 Oct 2021 02:16:22 +0000 you wrote:
> During the process of driver probing, the probe function should return < 0
> for failure, otherwise, the kernel will treat value > 0 as success.
> 
> Signed-off-by: Zheyu Ma <zheyuma97@gmail.com>
> ---
>  drivers/net/ethernet/cavium/thunder/nic_main.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Here is the summary with links:
  - cavium: Return negative value when pci_alloc_irq_vectors() fails
    https://git.kernel.org/netdev/net/c/b2cddb44bddc

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] 2+ messages in thread

end of thread, other threads:[~2021-10-18 13:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-18  2:16 [PATCH] cavium: Return negative value when pci_alloc_irq_vectors() fails Zheyu Ma
2021-10-18 13:00 ` 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).