Re: [PATCH net] bnxt_en: fix error return code in bnxt_init_board()

From: Edwin Peer
Date: Thu Nov 19 2020 - 13:54:25 EST


On Thu, Nov 19, 2020 at 5:29 AM Zhang Changzhong
<zhangchangzhong@xxxxxxxxxx> wrote:

> Fix to return a negative error code from the error handling
> case instead of 0, as done elsewhere in this function.
>
> Fixes: c0c050c58d84 ("bnxt_en: New Broadcom ethernet driver.")
> Reported-by: Hulk Robot <hulkci@xxxxxxxxxx>
> Signed-off-by: Zhang Changzhong <zhangchangzhong@xxxxxxxxxx>
> ---
> drivers/net/ethernet/broadcom/bnxt/bnxt.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
> index 7c21aaa8..11d0542 100644
> --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
> +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
> @@ -11590,6 +11590,7 @@ static int bnxt_init_board(struct pci_dev *pdev, struct net_device *dev)
> if (dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64)) != 0 &&
> dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32)) != 0) {
> dev_err(&pdev->dev, "System does not support DMA, aborting\n");
> + rc = -EIO;
> goto init_err_disable;
> }
>
> --
> 2.9.5

Reviewed-by: Edwin Peer <edwin.peer@xxxxxxxxxxxx>

Regards,
Edwin Peer

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature