Message ID | 20210515071605.7098-1-thunder.leizhen@huawei.com |
---|---|
State | New |
Headers | show |
Series | [1/1] net: bnx2: Fix error return code in bnx2_init_board() | expand |
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>
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
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; }
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(-) -- 2.26.0.106.g9fadedd