mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-25 20:10:23 +09:00
net: bnx2: Fix error return code in bnx2_init_board()
[ Upstream commit28c66b6da4] Fix to return -EPERM from the error handling case instead of 0, as done elsewhere in this function. Fixes:b6016b7673("[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> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
8eaca8d1ca
commit
8f793568b0
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user