mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-10 05:39:42 -04:00
net: thunder_bgx: Don't disable PCI device manually
thunder_bgx's PCI device is enabled with pcim_enable_device(), a managed devres function which ensures that the device gets enabled on driver detach automatically. Remove the calls to pci_disable_device(). Signed-off-by: Philipp Stanner <phasta@kernel.org> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> Link: https://patch.msgid.link/20250425085740.65304-10-phasta@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
committed by
Jakub Kicinski
parent
06133ddc35
commit
1549bd06e3
@@ -1608,7 +1608,7 @@ static int bgx_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
err = pcim_request_all_regions(pdev, DRV_NAME);
|
||||
if (err) {
|
||||
dev_err(dev, "PCI request regions failed 0x%x\n", err);
|
||||
goto err_disable_device;
|
||||
goto err_zero_drv_data;
|
||||
}
|
||||
|
||||
/* MAP configuration registers */
|
||||
@@ -1616,7 +1616,7 @@ static int bgx_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
if (!bgx->reg_base) {
|
||||
dev_err(dev, "BGX: Cannot map CSR memory space, aborting\n");
|
||||
err = -ENOMEM;
|
||||
goto err_disable_device;
|
||||
goto err_zero_drv_data;
|
||||
}
|
||||
|
||||
set_max_bgx_per_node(pdev);
|
||||
@@ -1688,8 +1688,7 @@ static int bgx_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
err_enable:
|
||||
bgx_vnic[bgx->bgx_id] = NULL;
|
||||
pci_free_irq(pdev, GMPX_GMI_TX_INT, bgx);
|
||||
err_disable_device:
|
||||
pci_disable_device(pdev);
|
||||
err_zero_drv_data:
|
||||
pci_set_drvdata(pdev, NULL);
|
||||
return err;
|
||||
}
|
||||
@@ -1708,7 +1707,6 @@ static void bgx_remove(struct pci_dev *pdev)
|
||||
pci_free_irq(pdev, GMPX_GMI_TX_INT, bgx);
|
||||
|
||||
bgx_vnic[bgx->bgx_id] = NULL;
|
||||
pci_disable_device(pdev);
|
||||
pci_set_drvdata(pdev, NULL);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user