aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/pensando/ionic
diff options
context:
space:
mode:
authorYang Yingliang <yangyingliang@huawei.com>2022-05-06 11:40:40 +0800
committerJakub Kicinski <kuba@kernel.org>2022-05-09 15:49:12 -0700
commite4b1045bf9cfec6f70ac6d3783be06c3a88dcb25 (patch)
treeb3f5d94644216561a1de7aecb7d377508f9905f2 /drivers/net/ethernet/pensando/ionic
parentselftests net: add UDP GRO fraglist + bpf self-tests (diff)
downloadlinux-dev-e4b1045bf9cfec6f70ac6d3783be06c3a88dcb25.tar.xz
linux-dev-e4b1045bf9cfec6f70ac6d3783be06c3a88dcb25.zip
ionic: fix missing pci_release_regions() on error in ionic_probe()
If ionic_map_bars() fails, pci_release_regions() need be called. Fixes: fbfb8031533c ("ionic: Add hardware init and device commands") Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20220506034040.2614129-1-yangyingliang@huawei.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/pensando/ionic')
-rw-r--r--drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c b/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c
index 6ffc62c41165..0a7a757494bc 100644
--- a/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c
+++ b/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c
@@ -256,7 +256,7 @@ static int ionic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
err = ionic_map_bars(ionic);
if (err)
- goto err_out_pci_disable_device;
+ goto err_out_pci_release_regions;
/* Configure the device */
err = ionic_setup(ionic);
@@ -360,6 +360,7 @@ err_out_teardown:
err_out_unmap_bars:
ionic_unmap_bars(ionic);
+err_out_pci_release_regions:
pci_release_regions(pdev);
err_out_pci_disable_device:
pci_disable_device(pdev);