virtio: pci: Fix an error handling path in vp_modern_probe()

[ Upstream commit 7a836a2aba ]

If an error occurs after a successful pci_request_selected_regions() call,
it should be undone by a corresponding pci_release_selected_regions() call,
as already done in vp_modern_remove().

Fixes: fd502729fb ("virtio-pci: introduce modern device module")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Message-Id: <237109725aad2c3c03d14549f777b1927c84b045.1648977064.git.christophe.jaillet@wanadoo.fr>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
Christophe JAILLET 2022-04-03 11:11:14 +02:00 коммит произвёл Greg Kroah-Hartman
Родитель 655aafaa80
Коммит e3b9204c08
1 изменённых файлов: 1 добавлений и 0 удалений

Просмотреть файл

@ -340,6 +340,7 @@ err_map_notify:
err_map_isr:
pci_iounmap(pci_dev, mdev->common);
err_map_common:
pci_release_selected_regions(pci_dev, mdev->modern_bars);
return err;
}
EXPORT_SYMBOL_GPL(vp_modern_probe);