]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
virtio: pci: Fix an error handling path in vp_modern_probe()
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sun, 3 Apr 2022 09:11:14 +0000 (11:11 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Jun 2022 16:41:23 +0000 (18:41 +0200)
commit6efb5526a5f3ad94743e5f7ec933e1908e9303eb
tree4543aac92f4968b2b49fea28c46c68f67efadd25
parentbfc70acd49037118084fd50b47953e20b1336c4a
virtio: pci: Fix an error handling path in vp_modern_probe()

[ Upstream commit 7a836a2aba09479c8e71fa43249eecc4af945f61 ]

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: fd502729fbbf ("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>
drivers/virtio/virtio_pci_modern_dev.c