ionic: fix missing pci_release_regions() on error in ionic_probe()
[ Upstream commit e4b1045bf9cfec6f70ac6d3783be06c3a88dcb25 ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
1a2e139e68
commit
53a55a3124
@ -255,7 +255,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);
|
||||
@ -359,6 +359,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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user