[PATCH 1/1] net: bnx2: Fix error return code in bnx2_init_board()

Subsystems: broadcom bnx2 gigabit ethernet driver, networking drivers, the rest

STALE1913d

3 messages, 3 authors, 2021-05-17 · open the first message on its own page

[PATCH 1/1] net: bnx2: Fix error return code in bnx2_init_board()

From: Zhen Lei <hidden>
Date: 2021-05-15 07:16:20

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 <redacted>
Signed-off-by: Zhen Lei <redacted>
---
 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

Re: [PATCH 1/1] net: bnx2: Fix error return code in bnx2_init_board()

From: Michael Chan <michael.chan@broadcom.com>
Date: 2021-05-15 16:03:40

On Sat, May 15, 2021 at 12:16 AM Zhen Lei [off-list ref] 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 <redacted>
Signed-off-by: Zhen Lei <redacted>
Reviewed-by: Michael Chan <michael.chan@broadcom.com>

Re: [PATCH 1/1] net: bnx2: Fix error return code in bnx2_init_board()

From: patchwork-bot+netdevbpf@kernel.org
Date: 2021-05-17 21:10:19

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 <redacted>
Signed-off-by: Zhen Lei <redacted>

[...]
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

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help