Skip to content

Commit e4b1045

Browse files
Yang Yingliangkuba-moo
authored andcommitted
ionic: fix missing pci_release_regions() on error in ionic_probe()
If ionic_map_bars() fails, pci_release_regions() need be called. Fixes: fbfb803 ("ionic: Add hardware init and device commands") Signed-off-by: Yang Yingliang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent edae34a commit e4b1045

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ static int ionic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
256256

257257
err = ionic_map_bars(ionic);
258258
if (err)
259-
goto err_out_pci_disable_device;
259+
goto err_out_pci_release_regions;
260260

261261
/* Configure the device */
262262
err = ionic_setup(ionic);
@@ -360,6 +360,7 @@ static int ionic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
360360

361361
err_out_unmap_bars:
362362
ionic_unmap_bars(ionic);
363+
err_out_pci_release_regions:
363364
pci_release_regions(pdev);
364365
err_out_pci_disable_device:
365366
pci_disable_device(pdev);

0 commit comments

Comments
 (0)