bnxt_en: Release PCI regions when DMA mask setup fails during probe.
Michael Chan
maintainerPATCH 1/1 bnxt_en: Release PCI regions when DMA mask setup fails during probe.
Jump to init_err_release to cleanup. bnxt_unmap_bars() will also be called but it will do nothing if the BARs are not mapped yet.
Fixes c0c050c58d84 ("bnxt_en: New Broadcom ethernet driver.")
Reported-by Jakub Kicinski <[email protected]>
Signed-off-by Michael Chan <[email protected]>
--- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/broadcom/bnxt/bnxt.c +1 -1
@@ -11591,7 +11591,7 @@ static int bnxt_init_board(struct pci_dev *pdev, struct net_device *dev) 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; + goto init_err_release; }pci_set_master (pdev);
Signature · 1 line
2.18.1
Quoted 6 lines · On Fri, 20 Nov 2020 02:44:31 -0500 Michael Chan wrote:
Jump to
init_err_releaseto cleanup.bnxt_unmap_bars()will also be called but it will do nothing if the BARs are not mapped yet.Fixes c0c050c58d84 ("bnxt_en: New Broadcom ethernet driver.")Reported-by Jakub Kicinski <[email protected]>Signed-off-by Michael Chan <[email protected]>
Applied, thanks!