public inbox for netdev@vger.kernel.org 
 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

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