Skip to content

Commit

Permalink
net: bnx2: Fix error return code in bnx2_init_board()
Browse files Browse the repository at this point in the history
Fix to return -EPERM from the error handling case instead of 0, as done
elsewhere in this function.

Fixes: b6016b7 ("[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>
  • Loading branch information
Zhen Lei authored and David S. Miller committed May 17, 2021
1 parent e0652f8 commit 28c66b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/broadcom/bnx2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 28c66b6

Please sign in to comment.