netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] net: bnx2: Fix error return code in bnx2_init_board()
@ 2021-05-15  7:16 Zhen Lei
  2021-05-15 15:59 ` Michael Chan
  2021-05-17 21:10 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Zhen Lei @ 2021-05-15  7:16 UTC (permalink / raw)
  To: Rasesh Mody, GR-Linux-NIC-Dev, David S . Miller, Jakub Kicinski,
	Michael Chan, netdev
  Cc: Zhen Lei

Fix to return -EPERM from the error handling case instead of 0, as done
elsewhere in this function.

Fixes: b6016b767397 ("[BNX2]: New Broadcom gigabit network driver.")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
---
 drivers/net/ethernet/broadcom/bnx2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/broadcom/bnx2.c b/drivers/net/ethernet/broadcom/bnx2.c
index c0986096c701d36..5bace8a93d73be5 100644
--- a/drivers/net/ethernet/broadcom/bnx2.c
+++ b/drivers/net/ethernet/broadcom/bnx2.c
@@ -8247,9 +8247,9 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev)
 		BNX2_WR(bp, PCI_COMMAND, reg);
 	} else if ((BNX2_CHIP_ID(bp) == BNX2_CHIP_ID_5706_A1) &&
 		!(bp->flags & BNX2_FLAG_PCIX)) {
-
 		dev_err(&pdev->dev,
 			"5706 A1 can only be used in a PCIX bus, aborting\n");
+		rc = -EPERM;
 		goto err_out_unmap;
 	}
 
-- 
2.26.0.106.g9fadedd



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

* Re: [PATCH 1/1] net: bnx2: Fix error return code in bnx2_init_board()
  2021-05-15  7:16 [PATCH 1/1] net: bnx2: Fix error return code in bnx2_init_board() Zhen Lei
@ 2021-05-15 15:59 ` Michael Chan
  2021-05-17 21:10 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Michael Chan @ 2021-05-15 15:59 UTC (permalink / raw)
  To: Zhen Lei
  Cc: Rasesh Mody, GR-Linux-NIC-Dev, David S . Miller, Jakub Kicinski,
	Michael Chan, netdev

[-- Attachment #1: Type: text/plain, Size: 413 bytes --]

On Sat, May 15, 2021 at 12:16 AM Zhen Lei <thunder.leizhen@huawei.com> wrote:
>
> Fix to return -EPERM from the error handling case instead of 0, as done
> elsewhere in this function.
>
> Fixes: b6016b767397 ("[BNX2]: New Broadcom gigabit network driver.")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>

Reviewed-by: Michael Chan <michael.chan@broadcom.com>

[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4209 bytes --]

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

* Re: [PATCH 1/1] net: bnx2: Fix error return code in bnx2_init_board()
  2021-05-15  7:16 [PATCH 1/1] net: bnx2: Fix error return code in bnx2_init_board() Zhen Lei
  2021-05-15 15:59 ` Michael Chan
@ 2021-05-17 21:10 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-05-17 21:10 UTC (permalink / raw)
  To: Zhen Lei; +Cc: rmody, GR-Linux-NIC-Dev, davem, kuba, mchan, netdev

Hello:

This patch was applied to netdev/net.git (refs/heads/master):

On Sat, 15 May 2021 15:16:05 +0800 you wrote:
> Fix to return -EPERM from the error handling case instead of 0, as done
> elsewhere in this function.
> 
> Fixes: b6016b767397 ("[BNX2]: New Broadcom gigabit network driver.")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
> 
> [...]

Here is the summary with links:
  - [1/1] net: bnx2: Fix error return code in bnx2_init_board()
    https://git.kernel.org/netdev/net/c/28c66b6da408

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:[~2021-05-17 21:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-15  7:16 [PATCH 1/1] net: bnx2: Fix error return code in bnx2_init_board() Zhen Lei
2021-05-15 15:59 ` Michael Chan
2021-05-17 21:10 ` 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).